From 1ec1377c087c590137cdf4b872fb7b6aad3bf6a6 Mon Sep 17 00:00:00 2001 From: nerix Date: Sun, 19 Jan 2025 14:16:10 +0100 Subject: [PATCH] fix: only remove logging channels if we added them (#5828) --- CHANGELOG.md | 2 ++ src/common/Channel.cpp | 3 ++- src/common/Channel.hpp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51b5cd62..7fcaffa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Bugfix: Fixed a crash relating to Lua HTTP. (#5800) - Bugfix: Fixed a crash that could occur on Linux and macOS when clicking "Install" from the update prompt. (#5818) - Bugfix: Fixed missing word wrap in update popup. (#5811) +- Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794) +- Bugfix: Closing a usercard will no longer cause stop-logging messages to be generated in channel logs. (#5828) - Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794, #5833) - Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784) - Dev: Updated Conan dependencies. (#5776) diff --git a/src/common/Channel.cpp b/src/common/Channel.cpp index 5850d702..cfe6b37c 100644 --- a/src/common/Channel.cpp +++ b/src/common/Channel.cpp @@ -41,7 +41,7 @@ Channel::Channel(const QString &name, Type type) Channel::~Channel() { auto *app = tryGetApp(); - if (app) + if (app && this->anythingLogged_) { app->getChatLogger()->closeChannel(this->name_, this->platform_); } @@ -106,6 +106,7 @@ void Channel::addMessage(MessagePtr message, MessageContext context, getApp()->getChatLogger()->addMessage(this->name_, message, this->platform_, this->getCurrentStreamID()); + this->anythingLogged_ = true; } } diff --git a/src/common/Channel.hpp b/src/common/Channel.hpp index d7940afb..2b7569c8 100644 --- a/src/common/Channel.hpp +++ b/src/common/Channel.hpp @@ -143,6 +143,7 @@ private: const QString name_; LimitedQueue messages_; Type type_; + bool anythingLogged_ = false; QTimer clearCompletionModelTimer_; };