fix(Communities): Open `#general` channel by default on creation

Closes: #5841
This commit is contained in:
Boris Melnik 2022-05-25 00:44:37 +03:00 committed by Iuri Matias
parent e607b7e223
commit 5967ce6ce8
1 changed files with 3 additions and 0 deletions

View File

@ -602,6 +602,9 @@ method communityJoined*[T](
if setActive:
self.setActiveSection(communitySectionItem)
if(channelGroup.chats.len > 0):
let chatId = channelGroup.chats[0].id
self.channelGroupModules[community.id].setActiveItemSubItem(chatId, "")
method communityLeft*[T](self: Module[T], communityId: string) =
if(not self.channelGroupModules.contains(communityId)):