1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-13 18:25:07 +00:00

Stop navigating at end of timeline

This commit is contained in:
Cadence Ember
2020-04-23 00:30:26 +12:00
parent b7d3309a2b
commit 85fa2a8b35

View File

@@ -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
}
}