From 10601710e9041d1a8d42d77713274c9e57fa371f Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 29 Jun 2021 15:03:32 -0400 Subject: [PATCH] fix(community): fix crash on going back to chats from community Fixes #2504 --- src/app/chat/views/channel.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/chat/views/channel.nim b/src/app/chat/views/channel.nim index 8706fe293c..a22e3f1b82 100644 --- a/src/app/chat/views/channel.nim +++ b/src/app/chat/views/channel.nim @@ -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)