diff --git a/src/app/chat/event_handling.nim b/src/app/chat/event_handling.nim index 1e0540559b..a530020916 100644 --- a/src/app/chat/event_handling.nim +++ b/src/app/chat/event_handling.nim @@ -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) diff --git a/src/app/chat/view.nim b/src/app/chat/view.nim index 20eb82d1af..db534edf97 100644 --- a/src/app/chat/view.nim +++ b/src/app/chat/view.nim @@ -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.}