fix: trigger changes in membership verification on chat update
This commit is contained in:
parent
10d82124fe
commit
92bd8a1b96
|
@ -26,9 +26,12 @@ QtObject:
|
|||
result.chatMembers = newChatMembersView(status)
|
||||
result.setup
|
||||
|
||||
proc membershipChanged*(self: ChatItemView) {.signal.}
|
||||
|
||||
proc setChatItem*(self: ChatItemView, chatItem: Chat) =
|
||||
self.chatItem = chatItem
|
||||
self.chatMembers.setMembers(chatItem.members)
|
||||
self.membershipChanged()
|
||||
|
||||
proc id*(self: ChatItemView): string {.slot.} = result = ?.self.chatItem.id
|
||||
|
||||
|
@ -118,8 +121,6 @@ QtObject:
|
|||
let pubKey = status_settings.getSetting[string](Setting.PublicKey, "0x0")
|
||||
return self.chatItem.isMember(pubKey)
|
||||
|
||||
proc membershipChanged*(self: ChatItemView) {.signal.}
|
||||
|
||||
QtProperty[bool] isMember:
|
||||
read = isMember
|
||||
notify = membershipChanged
|
||||
|
|
Loading…
Reference in New Issue