From ba4422b082d7565cb761d29d2eb65d3b1bd49ce9 Mon Sep 17 00:00:00 2001 From: nerix Date: Sun, 20 Nov 2022 17:02:21 +0100 Subject: [PATCH] fix: `/watching` channel jumping around (#4169) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/singletons/NativeMessaging.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e05d3451..199bcb26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,7 @@ - Bugfix: Fixed invalid/dangling completion when cycling through previous messages or replying (#4072) - Bugfix: Fixed incorrect .desktop icon path. (#4078) - Bugfix: Mark bad or invalid images as empty. (#4151) +- Bugfix: Fixed `/watching` channel jumping around. (#4169) - Dev: Got rid of BaseTheme (#4132) - Dev: Removed official support for QMake. (#3839, #3883) - Dev: Rewrote LimitedQueue (#3798) diff --git a/src/singletons/NativeMessaging.cpp b/src/singletons/NativeMessaging.cpp index 2f50c827..e9b864ca 100644 --- a/src/singletons/NativeMessaging.cpp +++ b/src/singletons/NativeMessaging.cpp @@ -239,8 +239,11 @@ void NativeMessagingServer::ReceiverThread::handleMessage( postToThread([=] { if (!name.isEmpty()) { - app->twitch->watchingChannel.reset( - app->twitch->getOrAddChannel(name)); + auto channel = app->twitch->getOrAddChannel(name); + if (app->twitch->watchingChannel.get() != channel) + { + app->twitch->watchingChannel.reset(channel); + } } if (attach || attachFullscreen)