From f04e7e54e41701a9bb4502993e75a45180a40cd0 Mon Sep 17 00:00:00 2001 From: nerix Date: Wed, 9 Oct 2024 11:27:16 +0200 Subject: [PATCH] fix: only unpause if a selected page exists (#5637) * fix: only unpause if a selected page exists * chore: add changelog entry * nit: reduce changes --------- Co-authored-by: Rasmus Karlsson --- CHANGELOG.md | 2 +- src/widgets/Window.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4976ddfaa..9b0d1e7fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ - Bugfix: Fixed tooltips and input completion popups not working after moving a split. (#5541, #5576) - Bugfix: Fixed rare issue on shutdown where the client would hang. (#5557) - Bugfix: Fixed `/clearmessages` not working with more than one window. (#5489) -- Bugfix: Fixed splits staying paused after unfocusing Chatterino in certain configurations. (#5504) +- Bugfix: Fixed splits staying paused after unfocusing Chatterino in certain configurations. (#5504, #5637) - Bugfix: Links with invalid characters in the domain are no longer detected. (#5509) - Bugfix: Fixed janky selection for messages with RTL segments (selection is still wrong, but consistently wrong). (#5525) - Bugfix: Fixed event emotes not showing up in autocomplete and popups. (#5239, #5580, #5582) diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index d91ca41df..c095c9c28 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -113,20 +113,14 @@ bool Window::event(QEvent *event) } case QEvent::WindowDeactivate: { - for (const auto &split : - this->notebook_->getSelectedPage()->getSplits()) - { - split->unpause(); - } - auto *page = this->notebook_->getSelectedPage(); if (page != nullptr) { std::vector splits = page->getSplits(); - for (Split *split : splits) { + split->unpause(); split->updateLastReadMessage(); }