fix(community): fix crash on going back to chats from community

Fixes #2504
This commit is contained in:
Jonathan Rainville 2021-06-29 15:03:32 -04:00 committed by Iuri Matias
parent 538dcd0b86
commit 10601710e9
1 changed files with 2 additions and 1 deletions

View File

@ -113,13 +113,14 @@ QtObject:
if (self.communities.activeCommunity.active and self.communities.activeCommunity.communityItem.lastChannelSeen != selectedChannel.id):
self.communities.activeCommunity.communityItem.lastChannelSeen = selectedChannel.id
self.communities.joinedCommunityList.replaceCommunity(self.communities.activeCommunity.communityItem)
else:
self.previousActiveChannelIndex = index
if not forceUpdate and self.activeChannel.id == selectedChannel.id: return
if selectedChannel.chatType.isOneToOne and selectedChannel.id == selectedChannel.name:
selectedChannel.name = self.userNameOrAlias(selectedChannel.id)
self.previousActiveChannelIndex = index
self.activeChannel.setChatItem(selectedChannel)
self.status.chat.setActiveChannel(selectedChannel.id)