fix: only remove logging channels if we added them (#5828)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ private:
|
||||
const QString name_;
|
||||
LimitedQueue<MessagePtr> messages_;
|
||||
Type type_;
|
||||
bool anythingLogged_ = false;
|
||||
QTimer clearCompletionModelTimer_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user