fix(contact): fix contact crash because of empty roles

This commit is contained in:
Jonathan Rainville 2022-01-13 13:51:11 -05:00 committed by Sale Djenic
parent a694b15d6c
commit e195053669
1 changed files with 10 additions and 1 deletions

View File

@ -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)