From 5bfe98bdf4ab7108b6fc738a0c8e4ebe7c754353 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 29 Oct 2020 17:26:34 +1300 Subject: [PATCH] Stop scrollback at top of timeline --- src/js/timeline.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/timeline.js b/src/js/timeline.js index 270b5c8..59e3120 100644 --- a/src/js/timeline.js +++ b/src/js/timeline.js @@ -396,7 +396,13 @@ class Timeline extends Subscribable { this.from = root.end // console.log(this.updateEvents, root.chunk) if (root.state) this.updateStateEvents(root.state) - this.updateEvents(root.chunk) + if (root.chunk.length) { + // there are events to display + this.updateEvents(root.chunk) + } else { + // we reached the top of the scrollback + this.reactiveTimeline.loadMore.remove() + } this.broadcast("afterScrollbackLoad") }