mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 14:54:48 +00:00
fix(@desktop/chat): Going from communities to chat reopen latest opened
chat fixes #3195
This commit is contained in:
parent
28a4362b64
commit
d3fdd4a575
@ -154,7 +154,7 @@ QtObject:
|
||||
proc setActiveChannel*(self: ChannelView, channel: string) {.slot.} =
|
||||
if (channel.len == 0):
|
||||
return
|
||||
|
||||
|
||||
if (channel == backToFirstChat):
|
||||
if (self.activeChannel.id.len == 0):
|
||||
self.setActiveChannelByIndex(0)
|
||||
@ -162,7 +162,10 @@ QtObject:
|
||||
|
||||
let selectedChannel = self.getChannelById(channel)
|
||||
self.activeChannel.setChatItem(selectedChannel)
|
||||
|
||||
|
||||
if not self.communities.activeCommunity.active:
|
||||
self.previousActiveChannelIndex = self.chats.chats.findIndexById(self.activeChannel.id)
|
||||
|
||||
discard self.status.chat.markAllChannelMessagesRead(self.activeChannel.id)
|
||||
|
||||
self.activeChannelChanged()
|
||||
|
Loading…
x
Reference in New Issue
Block a user