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.chatMembers = newChatMembersView(status)
|
||||||
result.setup
|
result.setup
|
||||||
|
|
||||||
|
proc membershipChanged*(self: ChatItemView) {.signal.}
|
||||||
|
|
||||||
proc setChatItem*(self: ChatItemView, chatItem: Chat) =
|
proc setChatItem*(self: ChatItemView, chatItem: Chat) =
|
||||||
self.chatItem = chatItem
|
self.chatItem = chatItem
|
||||||
self.chatMembers.setMembers(chatItem.members)
|
self.chatMembers.setMembers(chatItem.members)
|
||||||
|
self.membershipChanged()
|
||||||
|
|
||||||
proc id*(self: ChatItemView): string {.slot.} = result = ?.self.chatItem.id
|
proc id*(self: ChatItemView): string {.slot.} = result = ?.self.chatItem.id
|
||||||
|
|
||||||
|
@ -118,8 +121,6 @@ QtObject:
|
||||||
let pubKey = status_settings.getSetting[string](Setting.PublicKey, "0x0")
|
let pubKey = status_settings.getSetting[string](Setting.PublicKey, "0x0")
|
||||||
return self.chatItem.isMember(pubKey)
|
return self.chatItem.isMember(pubKey)
|
||||||
|
|
||||||
proc membershipChanged*(self: ChatItemView) {.signal.}
|
|
||||||
|
|
||||||
QtProperty[bool] isMember:
|
QtProperty[bool] isMember:
|
||||||
read = isMember
|
read = isMember
|
||||||
notify = membershipChanged
|
notify = membershipChanged
|
||||||
|
|
Loading…
Reference in New Issue