mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
fix(contact): fix contact crash because of empty roles
This commit is contained in:
parent
a694b15d6c
commit
e195053669
@ -124,7 +124,16 @@ QtObject:
|
|||||||
self.items[ind] = item
|
self.items[ind] = item
|
||||||
|
|
||||||
let index = self.createIndex(ind, 0, nil)
|
let index = self.createIndex(ind, 0, nil)
|
||||||
self.dataChanged(index, index, @[]) # all roles
|
|
||||||
|
self.dataChanged(index, index, @[
|
||||||
|
ModelRole.Name.int,
|
||||||
|
ModelRole.Icon.int,
|
||||||
|
ModelRole.IsIdenticon.int,
|
||||||
|
ModelRole.IsContact.int,
|
||||||
|
ModelRole.IsBlocked.int,
|
||||||
|
ModelRole.RequestReceived.int
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
proc updateName*(self: Model, pubKey: string, name: string) =
|
proc updateName*(self: Model, pubKey: string, name: string) =
|
||||||
let ind = self.findIndexByPubKey(pubKey)
|
let ind = self.findIndexByPubKey(pubKey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user