mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-14 12:34:46 +00:00
Merge branch 'fix/timeline-too-eager-flush' into 'develop'
Fix #290 Add a better check for fresh TL flushing Closes #290 See merge request pleroma/pleroma-fe!494
This commit is contained in:
commit
b1facdf7ad
1 changed files with 3 additions and 1 deletions
|
@ -29,9 +29,11 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false
|
|||
args['userId'] = userId
|
||||
args['tag'] = tag
|
||||
|
||||
const numStatusesBeforeFetch = timelineData.statuses.length
|
||||
|
||||
return apiService.fetchTimeline(args)
|
||||
.then((statuses) => {
|
||||
if (!older && statuses.length >= 20 && !timelineData.loading && timelineData.statuses.length) {
|
||||
if (!older && statuses.length >= 20 && !timelineData.loading && numStatusesBeforeFetch > 0) {
|
||||
store.dispatch('queueFlush', { timeline: timeline, id: timelineData.maxId })
|
||||
}
|
||||
update({store, statuses, timeline, showImmediately, userId})
|
||||
|
|
Loading…
Reference in a new issue