From 7c56e24fdc0f4c38f3b87efc24fa73c7a335e128 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 9 Nov 2025 10:19:55 -0500 Subject: [PATCH] Manually update badge count in initActiveConnection Without doing this, it's possible to start NeoChat and have no badge count despite having notable notifications. The reason for this is if badgeNotificationCount was updated and changed before this function call, and a call to refreshBadgeNotificationCount doesn't emit the changed signal. This is easy to work around by calling updateBadgeNotificationCount ourselves. --- src/app/controller.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/controller.cpp b/src/app/controller.cpp index 7cc392b76..c08083b0c 100644 --- a/src/app/controller.cpp +++ b/src/app/controller.cpp @@ -246,7 +246,10 @@ void Controller::initActiveConnection(NeoChatConnection *oldConnection, NeoChatC if (newConnection) { connect(newConnection, &NeoChatConnection::errorOccured, this, &Controller::errorOccured); connect(newConnection, &NeoChatConnection::badgeNotificationCountChanged, this, &Controller::updateBadgeNotificationCount); + + // Refresh and update manually, in case we init too late for the badge count to actually change. newConnection->refreshBadgeNotificationCount(); + updateBadgeNotificationCount(newConnection->badgeNotificationCount()); } Q_EMIT activeConnectionChanged(newConnection); }