mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-01 17:27:53 +00:00
fix: show a channel by default if there is at least one
This commit is contained in:
parent
1b3314ea9a
commit
29b2bbf13e
@ -128,6 +128,9 @@ QtObject:
|
||||
proc upsertChannel(self: ChatsView, channel: string) =
|
||||
if not self.messageList.hasKey(channel):
|
||||
self.messageList[channel] = newChatMessageList(channel, self.status)
|
||||
# If there is only one channel, set is as active
|
||||
if (self.activeChannel.chatItem == nil and self.chats.rowCount() == 1):
|
||||
self.setActiveChannelByIndex(0)
|
||||
|
||||
proc messagePushed*(self: ChatsView) {.signal.}
|
||||
|
||||
|
@ -38,7 +38,7 @@ QtObject:
|
||||
return ens.userNameOrAlias(self.status.chat.contacts[pubKey])
|
||||
generateAlias(pubKey)
|
||||
|
||||
method rowCount(self: ChannelsList, index: QModelIndex = nil): int = self.chats.len
|
||||
method rowCount*(self: ChannelsList, index: QModelIndex = nil): int = self.chats.len
|
||||
|
||||
proc renderBlock(self: ChannelsList, message: Message): string
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user