refactor: Remove Outcome from network requests (#4959)

This commit is contained in:
nerix
2023-11-12 14:51:51 +01:00
committed by GitHub
parent 95620e6e10
commit 6faf63c5c4
22 changed files with 122 additions and 228 deletions
+3 -7
View File
@@ -1381,11 +1381,11 @@ void TwitchChannel::refreshCheerEmotes()
getHelix()->getCheermotes(
this->roomId(),
[this, weak = weakOf<Channel>(this)](
const std::vector<HelixCheermoteSet> &cheermoteSets) -> Outcome {
const std::vector<HelixCheermoteSet> &cheermoteSets) {
auto shared = weak.lock();
if (!shared)
{
return Failure;
return;
}
std::vector<CheerEmoteSet> emoteSets;
@@ -1444,12 +1444,9 @@ void TwitchChannel::refreshCheerEmotes()
}
*this->cheerEmoteSets_.access() = std::move(emoteSets);
return Success;
},
[] {
// Failure
return Failure;
});
}
@@ -1656,11 +1653,10 @@ void TwitchChannel::updateSevenTVActivity()
std::dynamic_pointer_cast<TwitchChannel>(chan.lock());
if (!self)
{
return Success;
return;
}
self->nextSeventvActivity_ =
QDateTime::currentDateTimeUtc().addSecs(60);
return Success;
},
[](const auto &result) {
qCDebug(chatterinoSeventv)