Retain userId on clearing user timeline, don't flush when empty timeline

This commit is contained in:
shpuld 2019-01-08 23:09:03 +02:00
parent 76cfb15b3c
commit a8f6099be2
2 changed files with 3 additions and 1 deletions

View file

@ -31,7 +31,7 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false
return apiService.fetchTimeline(args)
.then((statuses) => {
if (!older && statuses.length >= 20 && !timelineData.loading) {
if (!older && statuses.length >= 20 && !timelineData.loading && timelineData.statuses.length) {
store.dispatch('queueFlush', { timeline: timeline, id: timelineData.maxId })
}
update({store, statuses, timeline, showImmediately, userId})