fix(chat_section): fix changing active chat on leaving another group chat (#14020)

* fix(chat_section): fix changing active chat on leaving another group chat

Fixes #9147
This commit is contained in:
Andrey Bocharnikov 2024-03-19 15:58:14 +07:00 committed by GitHub
parent 9ed38bddb7
commit 8e0f5f9487
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -738,6 +738,8 @@ method onCommunityChannelDeletedOrChatLeft*(self: Module, chatId: string) =
self.view.chatsModel().removeItemById(chatId)
self.removeSubmodule(chatId)
let activeChatId = self.controller.getActiveChatId()
if chatId == activeChatId:
self.setFirstChannelAsActive()
proc refreshHiddenBecauseNotPermittedState(self: Module) =