From 85fa2a8b352380f1e79da6122d4a31ae3e3dd59a Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 23 Apr 2020 00:30:26 +1200 Subject: [PATCH] Stop navigating at end of timeline --- src/site/html/static/js/post_overlay.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/site/html/static/js/post_overlay.js b/src/site/html/static/js/post_overlay.js index f6a9384..47bef46 100644 --- a/src/site/html/static/js/post_overlay.js +++ b/src/site/html/static/js/post_overlay.js @@ -175,9 +175,13 @@ function loadPostOverlay(shortcode, stateChangeType) { canInteractWithNavigation = false var futureShortcode = entry.getPreviousShortcode() } - await loadPostOverlay(futureShortcode, "replace") - const newOverlay = postOverlays.slice(-1)[0] - if (newOverlay === overlay) { // was cancelled + if (futureShortcode) { + await loadPostOverlay(futureShortcode, "replace") + const newOverlay = postOverlays.slice(-1)[0] + if (newOverlay === overlay) { // was cancelled + canInteractWithNavigation = true + } + } else { canInteractWithNavigation = true } }