better display of empty/initially-loading timeline

This commit is contained in:
Henry Jameson 2026-08-27 17:25:35 +03:00
commit d8e530581d
5 changed files with 44 additions and 18 deletions

View file

@ -52,9 +52,13 @@ const timelineFetcher = (timeline, argument, credentials) => {
const numStatusesBeforeFetch = timeline.statusIds.size
if (bottomedOut.value) return
if (older && bottomedOut.value) return
return fetchTimeline(args)
.then(({ data: statuses, pagination, timestamp }) => {
// No statuses for timeline, ever.
if (timeline.order.length === 0 && statuses.length === 0) {
bottomedOut.value = true
}
if (!older && statuses.length >= 20 && numStatusesBeforeFetch > 0) {
useTimelinesStore().requireReload(timeline.name)
}