mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 04:21:44 +00:00
fix(StatusQ/Utils): Fix ModelChangeTracker and ModelUtils to handle properly
This commit is contained in:
parent
51928f5c20
commit
c85a8d3647
@ -1,7 +1,7 @@
|
||||
import QtQml 2.14
|
||||
|
||||
QtObject {
|
||||
property alias model: d.target
|
||||
property var model
|
||||
|
||||
readonly property alias revision: d.revision
|
||||
|
||||
@ -12,6 +12,8 @@ QtObject {
|
||||
readonly property Connections _d: Connections {
|
||||
id: d
|
||||
|
||||
target: model ?? null
|
||||
|
||||
property int revision: 0
|
||||
|
||||
function onRowsInserted() {
|
||||
|
@ -54,8 +54,8 @@ QtObject {
|
||||
if (modelA === modelB)
|
||||
return true
|
||||
|
||||
const countA = modelA === null ? 0 : modelA.rowCount()
|
||||
const countB = modelB === null ? 0 : modelB.rowCount()
|
||||
const countA = !!modelA ? modelA.rowCount() : 0
|
||||
const countB = !!modelB ? modelB.rowCount() : 0
|
||||
|
||||
if (countA !== countB)
|
||||
return false
|
||||
@ -78,8 +78,8 @@ QtObject {
|
||||
if (modelA === modelB)
|
||||
return true
|
||||
|
||||
const countA = modelA === null ? 0 : modelA.rowCount()
|
||||
const countB = modelB === null ? 0 : modelB.rowCount()
|
||||
const countA = !!modelA ? modelA.rowCount() : 0
|
||||
const countB = !!modelB ? modelB.rowCount() : 0
|
||||
|
||||
if (countA !== countB)
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user