fix expanded threads disappearing

This commit is contained in:
Shpuld Shpuldson 2020-04-24 11:25:20 +03:00
commit 291c15581a

View file

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