fix: fix adding a second channel to a community disapearing
Fixes #1953
This commit is contained in:
parent
2f8d46fa76
commit
d1c6c0f9a9
|
@ -208,7 +208,7 @@ QtObject:
|
||||||
return "Chat was not created. Please try again later"
|
return "Chat was not created. Please try again later"
|
||||||
|
|
||||||
self.joinedCommunityList.addChannelToCommunity(communityId, chat)
|
self.joinedCommunityList.addChannelToCommunity(communityId, chat)
|
||||||
discard self.activeCommunity.chats.addChatItemToList(chat)
|
self.activeCommunity.addChatItemToList(chat)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error "Error creating the channel", msg = e.msg
|
error "Error creating the channel", msg = e.msg
|
||||||
result = fmt"Error creating the channel: {e.msg}"
|
result = fmt"Error creating the channel: {e.msg}"
|
||||||
|
|
|
@ -133,6 +133,11 @@ QtObject:
|
||||||
self.chats.setChats(chats)
|
self.chats.setChats(chats)
|
||||||
self.chatsChanged()
|
self.chatsChanged()
|
||||||
|
|
||||||
|
proc addChatItemToList*(self: CommunityItemView, chat: Chat) =
|
||||||
|
self.communityItem.chats.add(chat)
|
||||||
|
discard self.chats.addChatItemToList(chat)
|
||||||
|
self.chatsChanged()
|
||||||
|
|
||||||
QtProperty[QVariant] chats:
|
QtProperty[QVariant] chats:
|
||||||
read = getChats
|
read = getChats
|
||||||
notify = chatsChanged
|
notify = chatsChanged
|
||||||
|
|
Loading…
Reference in New Issue