From e74e3fa043efd419c79ce46a9f5214836753cc18 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 20 Oct 2021 11:42:22 +0800 Subject: [PATCH] FIX: Topic timeline not updating in megatopics. (#14645) Before this fix, jumping to posts using the topic timeline scrollbar will not update the counts since the topic scrollarea is not rerendered. Follow-up to db337b10ee2af66f464082ca24bb33536da5fbde --- app/assets/javascripts/discourse/app/widgets/topic-timeline.js | 2 +- 1 file changed, 1 insertion(+), 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 28437a7f540..f5b67655d5f 100644 --- a/app/assets/javascripts/discourse/app/widgets/topic-timeline.js +++ b/app/assets/javascripts/discourse/app/widgets/topic-timeline.js @@ -555,7 +555,7 @@ export default createWidget("topic-timeline", { if (!attrs.mobileView) { const streamLength = attrs.topic.get("postStream.stream.length"); - if (streamLength < 2) { + if (streamLength === 1) { const postsWrapper = document.querySelector(".posts-wrapper"); if (postsWrapper && postsWrapper.offsetHeight < 1000) { displayTimeLineScrollArea = false;