fix: fix getChannelById crashing on timeline call

Fixes #1987
This commit is contained in:
Jonathan Rainville 2021-03-05 10:22:37 -05:00 committed by Iuri Matias
parent 9fe925ca8f
commit 5300dcac28
1 changed files with 4 additions and 1 deletions

View File

@ -105,7 +105,10 @@ QtObject:
return
return self.communities.activeCommunity.chats.getChannel(index)
else:
return self.chats.getChannel(self.chats.chats.findIndexById(channel))
let index = self.chats.chats.findIndexById(channel)
if (index == -1):
return
return self.chats.getChannel(index)
proc updateChannelInRightList*(self: ChatsView, channel: Chat) =
if (self.communities.activeCommunity.active):