mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 21:39:24 +00:00
fix: Crash when 1-1 chats order is changing in the UI
(cherry picked from commit ba00228d0ff0b62e82f39d6a6841789f113bbc7f)
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…
x
Reference in New Issue
Block a user