fix: more force relayout on timeout/clear/delete (#5854)
This commit is contained in:
@@ -468,15 +468,16 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
||||
{
|
||||
chan->disableAllMessages();
|
||||
chan->addOrReplaceClearChat(std::move(clearChat.message), time);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
chan->addOrReplaceTimeout(std::move(clearChat.message), time);
|
||||
}
|
||||
|
||||
chan->addOrReplaceTimeout(std::move(clearChat.message), time);
|
||||
|
||||
// refresh all
|
||||
getApp()->getWindows()->repaintVisibleChatWidgets(chan.get());
|
||||
if (getSettings()->hideModerated)
|
||||
{
|
||||
// XXX: This is expensive. We could use a layout request if the layout
|
||||
// would store the previous message flags.
|
||||
getApp()->getWindows()->forceLayoutChannelViews();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,6 +252,12 @@ void TwitchIrcServer::initialize()
|
||||
auto now = QDateTime::currentDateTime();
|
||||
chan->addOrReplaceClearChat(
|
||||
MessageBuilder::makeClearChatMessage(now, actor), now);
|
||||
if (getSettings()->hideModerated)
|
||||
{
|
||||
// XXX: This is expensive. We could use a layout request if the layout
|
||||
// would store the previous message flags.
|
||||
getApp()->getWindows()->forceLayoutChannelViews();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -317,6 +323,12 @@ void TwitchIrcServer::initialize()
|
||||
msg->flags.set(MessageFlag::PubSub);
|
||||
chan->addOrReplaceTimeout(msg.release(),
|
||||
QDateTime::currentDateTime());
|
||||
if (getSettings()->hideModerated)
|
||||
{
|
||||
// XXX: This is expensive. We could use a layout request if the layout
|
||||
// would store the previous message flags.
|
||||
getApp()->getWindows()->forceLayoutChannelViews();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user