fix(chat): ensure chatType is set properly

In ebd29d9ffd we've introduced a regression where
the channel list didn't expose the chat's chatType to the view, causing 1-on-1 chats
identicons to break.

This commit reintrodruces the chatType to the view.
This commit is contained in:
Pascal Precht 2020-06-02 11:45:22 +02:00 committed by Pascal Precht
parent 9e25ba1d95
commit 8332e3ac8a
1 changed files with 1 additions and 2 deletions

View File

@ -81,8 +81,7 @@ proc join*(self: ChatModel, chatId: string, chatTypeInt: ChatType, isNewChat: bo
proc load*(self: ChatModel) =
let chatList = status_chat.loadChats()
for chat in chatList:
# TODO: use correct type of chat instead of hardcoded 2 (assumes it's only public chats)
self.join(chat.id, ChatType.Public, false)
self.join(chat.id, chat.chatType, false)
self.events.emit("chatsLoaded", ChatArgs(chats: chatList))
proc leave*(self: ChatModel, chatId: string) =