From 38ea47df890e8a4b72c3b6009d1d5b8d3ec77b2e Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Thu, 19 May 2022 20:42:40 -0400 Subject: Fix virtual scrolling when the user has a lot of pinned statuses --- src/components/timeline/timeline.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/components/timeline') diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 8ec5d1e5..e92eb031 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -76,8 +76,9 @@ const Timeline = { statusesToDisplay () { const amount = this.timeline.visibleStatuses.length const statusesPerSide = Math.ceil(Math.max(3, window.innerHeight / 80)) - const min = Math.max(0, this.virtualScrollIndex - statusesPerSide) - const max = Math.min(amount, this.virtualScrollIndex + statusesPerSide) + const nonPinnedIndex = this.virtualScrollIndex - this.filteredPinnedStatusIds.length + const min = Math.max(0, nonPinnedIndex - statusesPerSide) + const max = Math.min(amount, nonPinnedIndex + statusesPerSide) return this.timeline.visibleStatuses.slice(min, max).map(_ => _.id) }, virtualScrollingEnabled () { -- cgit v1.2.3-70-g09d2 From 58b82172836c71204c9c71f2aead284caf76b969 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 31 May 2022 20:28:47 +0300 Subject: fix gap between panel heading and timeline menu --- src/components/timeline/timeline_quick_settings.vue | 1 - src/components/timeline_menu/timeline_menu.vue | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/components/timeline') diff --git a/src/components/timeline/timeline_quick_settings.vue b/src/components/timeline/timeline_quick_settings.vue index 5efc5d7c..98fab926 100644 --- a/src/components/timeline/timeline_quick_settings.vue +++ b/src/components/timeline/timeline_quick_settings.vue @@ -93,7 +93,6 @@