diff options
| author | Henry Jameson <me@hjkos.com> | 2022-06-08 02:13:47 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-06-08 02:13:47 +0300 |
| commit | 1154a6514bf5596aa55aa415e1640560bd3716b3 (patch) | |
| tree | 4c088c0b9d02a827b8f5d2a055631854cf645df7 /src/components/timeline/timeline.js | |
| parent | fd831a27f4e9c6bcd5c40f3449d63546fba2560d (diff) | |
| parent | 0aa334515bd67ca69e84177c22273592f694fc28 (diff) | |
Merge remote-tracking branch 'origin/develop' into disjointed-popovers
* origin/develop: (25 commits)
force panel headers to be square on mobile (for now?)
fix gap between panel heading and timeline menu
Fix Open Chat button
fix?
fix
Revert "Merge branch 'revert-a88abc7e' into 'develop'"
Revert "Merge branch 'from/develop/tusooa/lang-opts' into 'develop'"
Fix registration error
stick chat scroll to bottom to help with OSK resizing the viewport
Pass file name of cropped avatar to form data
Add English translation for filtering end-of-poll notifications
Add settings for filtering end-of-poll notifications
Add English translations for poll-end notifications
Show poll-end notifications
Fix virtual scrolling when the user has a lot of pinned statuses
Update dependency @vuelidate/core to v2.0.0-alpha.41
Make lint happy
Make lint happy
Add English translation for language options
Add email language option to registration form
...
Diffstat (limited to 'src/components/timeline/timeline.js')
| -rw-r--r-- | src/components/timeline/timeline.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 94f0e916..c575e876 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -77,8 +77,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 () { |
