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
|
||||
|
||||
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) =
|
||||
let ind = self.findIndexByPubKey(pubKey)
|
||||
|
|
Loading…
Reference in New Issue