clear up queueFlush nonsense
This commit is contained in:
parent
12df5d09ab
commit
1c1526c065
6 changed files with 14 additions and 15 deletions
|
|
@ -50,7 +50,7 @@ const timelineFetcher = (timeline, argument, credentials) => {
|
|||
return fetchTimeline(args)
|
||||
.then(({ data: statuses, pagination, timestamp }) => {
|
||||
if (!older && statuses.length >= 20 && numStatusesBeforeFetch > 0) {
|
||||
useTimelinesStore().queueFlush(timeline.name, timeline.maxId)
|
||||
useTimelinesStore().requireReload(timeline.name)
|
||||
}
|
||||
|
||||
if (older && statuses.length === 0) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const emptyTl = (name, argument = null) => {
|
|||
maxId: '',
|
||||
minId: '',
|
||||
streaming: false,
|
||||
flushMarker: 0,
|
||||
reloadNeeded: false,
|
||||
fetcher: null,
|
||||
socket: null,
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ export const useTimelinesStore = defineStore('timelines', {
|
|||
timeline.newStatusCount = 0
|
||||
timeline.maxId = ''
|
||||
timeline.minId = ''
|
||||
timeline.flushMarker = 0
|
||||
timeline.reloadNeeded = false
|
||||
},
|
||||
activatePersistents() {
|
||||
TIMELINES.forEach((name) => {
|
||||
|
|
@ -295,12 +295,12 @@ export const useTimelinesStore = defineStore('timelines', {
|
|||
syncOrder(timeline) {
|
||||
timeline.order = timeline.order.filter((id) => timeline.statusIds.has(id))
|
||||
},
|
||||
queueFlush(timeline, id) {
|
||||
this[timeline].flushMarker = id
|
||||
requireReload(timeline, id) {
|
||||
this[timeline].reloadNeeded = true
|
||||
},
|
||||
queueFlushAll() {
|
||||
requireReloadAll() {
|
||||
Object.keys(this).forEach((timeline) => {
|
||||
this[timeline].flushMarker = this[timeline].maxId
|
||||
this[timeline].reloadNeeded = true
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue