fix: open first chat on load
This commit is contained in:
parent
4fae0eb100
commit
449b8c0454
|
@ -23,6 +23,9 @@ proc handleChatEvents(self: ChatController) =
|
|||
discard self.view.chats.addChatItemToList(channel.chat)
|
||||
self.status.chat.chatMessages(channel.chat.id)
|
||||
|
||||
self.status.events.on("chatsLoaded") do(e:Args):
|
||||
self.view.setActiveChannelByIndex(0)
|
||||
|
||||
self.status.events.on("channelJoined") do(e: Args):
|
||||
var channel = ChannelArgs(e)
|
||||
discard self.view.chats.addChatItemToList(channel.chat)
|
||||
|
|
|
@ -170,10 +170,6 @@ QtObject:
|
|||
if not self.messageList.hasKey(channel):
|
||||
self.messageList[channel] = newChatMessageList(channel, self.status)
|
||||
self.channelOpenTime[channel] = now().toTime.toUnix * 1000
|
||||
# If there is only one channel, set is as active
|
||||
# if (self.activeChannel.chatItem == nil and self.chats.rowCount() == 1):
|
||||
# self.setActiveChannelByIndex(0)
|
||||
# RRAMOS: commented because it was hanging the app on login
|
||||
|
||||
proc messagePushed*(self: ChatsView) {.signal.}
|
||||
|
||||
|
|
Loading…
Reference in New Issue