mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-26 20:21:40 +01:00
Do not call hasSeenUpdate onUpdate
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
f662a25c8b
commit
e94a9b36b3
@ -56,7 +56,7 @@ export class TimelineViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
let hasSeenUpdate = false;
|
let hasSeenUpdate = false;
|
||||||
const checkForUpdate = (idx, tile) => {
|
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,
|
It's possible that this method executes before the GapTile has been rendered,
|
||||||
so don't count the GapTile as an update.
|
so don't count the GapTile as an update.
|
||||||
@ -69,7 +69,7 @@ export class TimelineViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
const subscription = {
|
const subscription = {
|
||||||
onAdd: (idx, tile) => checkForUpdate(idx, tile),
|
onAdd: (idx, tile) => checkForUpdate(idx, tile),
|
||||||
onUpdate: (idx, tile) => checkForUpdate(idx, tile),
|
onUpdate: () => {/*checkForUpdate(idx, tile)*/},
|
||||||
onRemove: (idx, tile) => checkForUpdate(idx, tile),
|
onRemove: (idx, tile) => checkForUpdate(idx, tile),
|
||||||
onMove: () => { /* shouldn't be called */ },
|
onMove: () => { /* shouldn't be called */ },
|
||||||
onReset: () => { /* shouldn't be called */ }
|
onReset: () => { /* shouldn't be called */ }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user