From d067ee1c5a73bd71e0d054483f8140f623e946f1 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 26 Oct 2021 14:53:49 -0400 Subject: [PATCH] UX: Never show back button if less than current position --- app/assets/javascripts/discourse/app/widgets/topic-timeline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/widgets/topic-timeline.js b/app/assets/javascripts/discourse/app/widgets/topic-timeline.js index f5b67655d5f..310a8a346c6 100644 --- a/app/assets/javascripts/discourse/app/widgets/topic-timeline.js +++ b/app/assets/javascripts/discourse/app/widgets/topic-timeline.js @@ -225,10 +225,11 @@ createWidget("timeline-scrollarea", { let showButton = false; const hasBackPosition = + position.lastRead && position.lastRead > 3 && + position.lastRead > position.current && Math.abs(position.lastRead - position.current) > 3 && Math.abs(position.lastRead - position.total) > 1 && - position.lastRead && position.lastRead !== position.total; if (hasBackPosition) {