Remove leak

Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
RMidhunSuresh 2021-10-27 11:03:34 +05:30
parent ebafd8c42b
commit 177ef43ebf

View File

@ -63,10 +63,10 @@ export class TimelineViewModel extends ViewModel {
}; };
this.tiles.subscribe(subscription); this.tiles.subscribe(subscription);
const gapResult = await gapPromise; const gapResult = await gapPromise;
this.tiles.unsubscribe(subscription);
if (!gapResult) { if (!gapResult) {
return; return;
} }
this.tiles.unsubscribe(subscription);
if (!hasSeenUpdate) { if (!hasSeenUpdate) {
this.watchForGapFill(gapTile.notifyVisible(), gapTile); this.watchForGapFill(gapTile.notifyVisible(), gapTile);
} }