From 9e28bdcc88f11ab3c50559a6ac54e5ad444db83b Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Fri, 10 Feb 2023 12:35:02 +0100 Subject: [PATCH] don't try to fill when we had an error before --- src/domain/session/room/timeline/tiles/GapTile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/domain/session/room/timeline/tiles/GapTile.js b/src/domain/session/room/timeline/tiles/GapTile.js index 58f0b3a6..66e83147 100644 --- a/src/domain/session/room/timeline/tiles/GapTile.js +++ b/src/domain/session/room/timeline/tiles/GapTile.js @@ -63,6 +63,13 @@ export class GapTile extends SimpleTile { } async notifyVisible() { + // if any error happened before (apart from being offline), + // let the user dismiss the error before trying to backfill + // again so we don't try to do backfill the don't succeed + // in quick succession + if (this.errorViewModel) { + return; + } // we do (up to 10) backfills while no new tiles have been added to the timeline // because notifyVisible won't be called again until something gets added to the timeline let depth = 0;