diff --git a/src/domain/session/room/timeline/tiles/GapTile.js b/src/domain/session/room/timeline/tiles/GapTile.js index f41dd722..3a7f7533 100644 --- a/src/domain/session/room/timeline/tiles/GapTile.js +++ b/src/domain/session/room/timeline/tiles/GapTile.js @@ -38,6 +38,7 @@ export class GapTile extends SimpleTile { } catch (err) { console.error(`room.fillGap(): ${err.message}:\n${err.stack}`); this._error = err; + this._loading = false; this.emitChange("error"); if (err instanceof ConnectionError) { /* diff --git a/src/platform/web/ui/session/room/timeline/GapView.js b/src/platform/web/ui/session/room/timeline/GapView.js index 03f87fcf..87afe503 100644 --- a/src/platform/web/ui/session/room/timeline/GapView.js +++ b/src/platform/web/ui/session/room/timeline/GapView.js @@ -30,16 +30,17 @@ export class GapView extends TemplateView { isAtTop: vm => vm.isAtTop, }; return t.li({ className }, [ - t.map(vm => vm.error, - (error, t, vm) => { + t.map(vm => vm.isLoading, + (isLoading, t, vm) => { let elements; + const error = vm.error; if (error) { elements = [t.strong(() => error.message)]; if (error.showSpinner) { elements.unshift(spinner(t)); } } - else if (vm.isLoading) { + else if (isLoading) { elements = [spinner(t), t.span(vm.i18n`Loading more messages …`)]; } else {