perf: add signal to invalidate buffers without doing layout (#5123)

This commit is contained in:
nerix
2024-01-24 18:13:31 +01:00
committed by GitHub
parent 5628605de4
commit 7604d7ea4a
7 changed files with 51 additions and 9 deletions
+7 -2
View File
@@ -211,6 +211,11 @@ void WindowManager::forceLayoutChannelViews()
this->layoutChannelViews(nullptr);
}
void WindowManager::invalidateChannelViewBuffers(Channel *channel)
{
this->invalidateBuffersRequested.invoke(channel);
}
void WindowManager::repaintVisibleChatWidgets(Channel *channel)
{
this->layoutRequested.invoke(channel);
@@ -407,10 +412,10 @@ void WindowManager::initialize(Settings &settings, const Paths &paths)
this->forceLayoutChannelViews();
});
settings.alternateMessages.connect([this](auto, auto) {
this->forceLayoutChannelViews();
this->invalidateChannelViewBuffers();
});
settings.separateMessages.connect([this](auto, auto) {
this->forceLayoutChannelViews();
this->invalidateChannelViewBuffers();
});
settings.collpseMessagesMinLines.connect([this](auto, auto) {
this->forceLayoutChannelViews();