mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fixes #1162
This commit is contained in:
parent
fff979b3c0
commit
aac27c2a0d
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue