This commit is contained in:
fourtf 2019-07-31 23:03:55 +02:00
parent fff979b3c0
commit aac27c2a0d
2 changed files with 7 additions and 3 deletions

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,7 +635,10 @@ void TwitchChannel::loadRecentMessages()
}
}
shared->addMessagesAtStart(allBuiltMessages);
postToThread(
[shared, messages = std::move(allBuiltMessages)]() mutable {
shared->addMessagesAtStart(messages);
});
return Success;
});

View file

@ -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 <QDateTime>
@ -122,7 +123,7 @@ void LogsPopup::getLogviewerLogs(const QString &roomID)
static_cast<Communi::IrcPrivateMessage *>(ircMessage);
TwitchMessageBuilder builder(this->channel_.get(), privMsg, args);
messages.push_back(builder.build());
};
}
this->setMessages(messages);
return Success;