From 501f14fead3acccff69a64e220260a4960c3cab8 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 1 Aug 2025 12:27:35 +0200 Subject: [PATCH] Fix account switching on logout --- src/libneochat/accountmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libneochat/accountmanager.cpp b/src/libneochat/accountmanager.cpp index 763f7a504..693549472 100644 --- a/src/libneochat/accountmanager.cpp +++ b/src/libneochat/accountmanager.cpp @@ -173,7 +173,7 @@ void AccountManager::addConnection(NeoChatConnection *connection) }); connect(connection, &NeoChatConnection::loggedOut, this, [this, connection] { // Only set the connection if the account being logged out is currently active - if (m_accountRegistry->accounts().count() > 1 && connection == activeConnection()) { + if (m_accountRegistry->accounts().count() == 1 && connection == activeConnection()) { setActiveConnection(dynamic_cast(m_accountRegistry->accounts()[0])); } else { setActiveConnection(nullptr);