Retain userId on clearing user timeline, don't flush when empty timeline
This commit is contained in:
parent
76cfb15b3c
commit
a8f6099be2
@ -346,7 +346,9 @@ export const mutations = {
|
||||
each(oldTimeline.visibleStatuses, (status) => { oldTimeline.visibleStatusesObject[status.id] = status })
|
||||
},
|
||||
clearTimeline (state, { timeline }) {
|
||||
const userId = state.timelines[timeline].userId
|
||||
state.timelines[timeline] = emptyTl()
|
||||
state.timelines[timeline].userId = userId
|
||||
},
|
||||
setFavorited (state, { status, value }) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
|
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user