diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index b8ce6509b..5ec10aa3a 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -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(this)](auto result) -> Outcome { auto shared = weak.lock(); @@ -635,7 +635,10 @@ void TwitchChannel::loadRecentMessages() } } - shared->addMessagesAtStart(allBuiltMessages); + postToThread( + [shared, messages = std::move(allBuiltMessages)]() mutable { + shared->addMessagesAtStart(messages); + }); return Success; }); diff --git a/src/widgets/dialogs/LogsPopup.cpp b/src/widgets/dialogs/LogsPopup.cpp index 46e7f7126..eedfb3e4b 100644 --- a/src/widgets/dialogs/LogsPopup.cpp +++ b/src/widgets/dialogs/LogsPopup.cpp @@ -7,6 +7,7 @@ #include "providers/twitch/PartialTwitchUser.hpp" #include "providers/twitch/TwitchChannel.hpp" #include "providers/twitch/TwitchMessageBuilder.hpp" +#include "util/PostToThread.hpp" #include "widgets/helper/ChannelView.hpp" #include @@ -122,7 +123,7 @@ void LogsPopup::getLogviewerLogs(const QString &roomID) static_cast(ircMessage); TwitchMessageBuilder builder(this->channel_.get(), privMsg, args); messages.push_back(builder.build()); - }; + } this->setMessages(messages); return Success;