re-enabled loading recent messages concurrently

@pajlada please check if the code can stay commented out
This commit is contained in:
fourtf
2019-08-13 14:33:16 +02:00
parent 6274c05520
commit 18f3a816ed
3 changed files with 25 additions and 24 deletions
+5 -5
View File
@@ -612,7 +612,7 @@ void TwitchChannel::loadRecentMessages()
Env::get().recentMessagesApiUrl.arg(this->getName()));
request.setCaller(QThread::currentThread());
// can't be concurrent right now due to SignalVector
// request.setExecuteConcurrently(true);
request.setExecuteConcurrently(true);
request.onSuccess([weak = weakOf<Channel>(this)](auto result) -> Outcome {
auto shared = weak.lock();
@@ -635,10 +635,10 @@ void TwitchChannel::loadRecentMessages()
}
}
// postToThread(
// [shared, messages = std::move(allBuiltMessages)]() mutable {
shared->addMessagesAtStart(allBuiltMessages);
// });
postToThread(
[shared, messages = std::move(allBuiltMessages)]() mutable {
shared->addMessagesAtStart(messages);
});
return Success;
});