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 db337b10ee
This commit is contained in:
Alan Guo Xiang Tan 2021-10-20 11:42:22 +08:00 committed by GitHub
parent 9bc68a5502
commit e74e3fa043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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