bottomedOut/loadOlder resets

This commit is contained in:
Henry Jameson 2026-09-01 11:19:22 +03:00
commit 725b2f5387
2 changed files with 10 additions and 1 deletions

View file

@ -52,7 +52,11 @@ const timelineFetcher = (timeline, argument, credentials) => {
const numStatusesBeforeFetch = timeline.statusIds.size
if (older && bottomedOut.value) return
if (older && bottomedOut.value) {
loadingOlder.value = false
return
}
return fetchTimeline(args)
.then(({ data, pagination, timestamp }) => {
// No statuses for timeline, ever.
@ -135,6 +139,9 @@ const timelineFetcher = (timeline, argument, credentials) => {
loadingOlder,
loadingNewer,
bottomedOut,
resetBottomedOut: () => {
bottomedOut.value = false
},
}
}

View file

@ -196,6 +196,7 @@ export const useTimelinesStore = defineStore('timelines', {
timeline.maxId = ''
timeline.minId = ''
timeline.reloadNeeded = false
timeline.fetcher.resetBottomedOut()
},
activatePersistents() {
TIMELINES.forEach((name) => {
@ -443,6 +444,7 @@ export const useTimelinesStore = defineStore('timelines', {
...timeline.order.filter((id) => !timeline.ignoredIds.has(id)),
])
this.updateTimelineExtremes(timeline, {}, true)
timeline.fetcher.resetBottomedOut()
},
syncOrder(timeline) {
timeline.order = timeline.order.filter((id) => timeline.statusIds.has(id))