Reduce the number of room delegate errors

This commit is contained in:
miruka
2020-04-14 10:55:01 -04:00
parent 6536f89507
commit 01adcff77e
3 changed files with 17 additions and 6 deletions

View File

@@ -51,13 +51,13 @@ QtObject {
function onModelItemSet(syncId, indexThen, indexNow, changedFields){
if (indexThen === undefined) {
print("insert", syncId, indexThen, indexNow,
JSON.stringify(changedFields))
// print("insert", syncId, indexThen, indexNow,
// JSON.stringify(changedFields))
ModelStore.get(syncId).insert(indexNow, changedFields)
} else {
print("set", syncId, indexThen, indexNow,
JSON.stringify(changedFields))
// print("set", syncId, indexThen, indexNow,
// JSON.stringify(changedFields))
const model = ModelStore.get(syncId)
model.set(indexThen, changedFields)
if (indexThen !== indexNow) model.move(indexThen, indexNow, 1)