fix: Crash when 1-1 chats order is changing in the UI
(cherry picked from commit ba00228d0f
)
This commit is contained in:
parent
99b2a87fe4
commit
856b0d8139
|
@ -340,6 +340,7 @@ QtObject:
|
|||
self.items[index].icon = icon
|
||||
self.items[index].trustStatus = trustStatus
|
||||
let modelIndex = self.createIndex(index, 0, nil)
|
||||
defer: modelIndex.delete
|
||||
self.dataChanged(modelIndex, modelIndex, @[
|
||||
ModelRole.Name.int,
|
||||
ModelRole.Icon.int,
|
||||
|
@ -355,6 +356,7 @@ QtObject:
|
|||
self.items[index].emoji = emoji
|
||||
self.items[index].color = color
|
||||
let modelIndex = self.createIndex(index, 0, nil)
|
||||
defer: modelIndex.delete
|
||||
self.dataChanged(modelIndex, modelIndex, @[
|
||||
ModelRole.Name.int,
|
||||
ModelRole.Description.int,
|
||||
|
@ -509,6 +511,7 @@ QtObject:
|
|||
return
|
||||
self.items[index].lastMessageTimestamp = lastMessageTimestamp
|
||||
let modelIndex = self.createIndex(index, 0, nil)
|
||||
defer: modelIndex.delete
|
||||
self.dataChanged(modelIndex, modelIndex, @[ModelRole.LastMessageTimestamp.int])
|
||||
|
||||
proc reorderChats*(
|
||||
|
|
Loading…
Reference in New Issue