From 177ef43ebf7dcea3237ccf701bebb14f29bb380a Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 27 Oct 2021 11:03:34 +0530 Subject: [PATCH] Remove leak Signed-off-by: RMidhunSuresh --- src/domain/session/room/timeline/TimelineViewModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/session/room/timeline/TimelineViewModel.js b/src/domain/session/room/timeline/TimelineViewModel.js index 74a1f0c9..f0435a51 100644 --- a/src/domain/session/room/timeline/TimelineViewModel.js +++ b/src/domain/session/room/timeline/TimelineViewModel.js @@ -63,10 +63,10 @@ export class TimelineViewModel extends ViewModel { }; this.tiles.subscribe(subscription); const gapResult = await gapPromise; + this.tiles.unsubscribe(subscription); if (!gapResult) { return; } - this.tiles.unsubscribe(subscription); if (!hasSeenUpdate) { this.watchForGapFill(gapTile.notifyVisible(), gapTile); }