Do not call hasSeenUpdate onUpdate

Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
RMidhunSuresh 2021-10-29 12:16:22 +05:30
parent f662a25c8b
commit e94a9b36b3

View File

@ -56,7 +56,7 @@ export class TimelineViewModel extends ViewModel {
}
let hasSeenUpdate = false;
const checkForUpdate = (idx, tile) => {
if (tile.shape !== "gap" && !tile.isOwn) {
if (tile.shape !== "gap") {
/*
It's possible that this method executes before the GapTile has been rendered,
so don't count the GapTile as an update.
@ -69,7 +69,7 @@ export class TimelineViewModel extends ViewModel {
}
const subscription = {
onAdd: (idx, tile) => checkForUpdate(idx, tile),
onUpdate: (idx, tile) => checkForUpdate(idx, tile),
onUpdate: () => {/*checkForUpdate(idx, tile)*/},
onRemove: (idx, tile) => checkForUpdate(idx, tile),
onMove: () => { /* shouldn't be called */ },
onReset: () => { /* shouldn't be called */ }