From 291c15581a36a87b1cae0625d6dad879a618c110 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 24 Apr 2020 11:25:20 +0300 Subject: [PATCH] fix expanded threads disappearing --- src/components/timeline/timeline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 9737be233..ff2c77ecc 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -183,12 +183,12 @@ const Timeline = { // if the status is too far from viewport, check the next/previous ones if // they happen to be better while (err < -100 && approxIndex < statuses.length - 1) { - approxIndex++ err += statuses[approxIndex].offsetHeight + approxIndex++ } while (err > window.innerHeight + 100 && approxIndex > 0) { - err -= statuses[approxIndex].offsetHeight approxIndex-- + err -= statuses[approxIndex].offsetHeight } // this status is now the center point for virtual scrolling and visible