better display of empty/initially-loading timeline
This commit is contained in:
parent
8f6b83fc3d
commit
d8e530581d
5 changed files with 44 additions and 18 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue