fix repeat deduplication logic
This commit is contained in:
parent
9a263692ea
commit
53498072e5
1 changed files with 17 additions and 11 deletions
|
|
@ -287,24 +287,30 @@ export const useTimelinesStore = defineStore('timelines', {
|
||||||
timeline.order.unshift(...filtered)
|
timeline.order.unshift(...filtered)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const newStatuses = new Set()
|
||||||
|
|
||||||
statuses.forEach((statusId) => {
|
statuses.forEach((statusId) => {
|
||||||
const isNew = !timeline.statusIds.has(statusId)
|
const isNew = !timeline.statusIds.has(statusId)
|
||||||
timeline.statusIds.add(statusId)
|
timeline.statusIds.add(statusId)
|
||||||
|
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
const seenBefore = this.checkSeenBefore(timeline, statusId)
|
newStatuses.add(statusId)
|
||||||
if (!seenBefore) {
|
}
|
||||||
if (showImmediately) {
|
})
|
||||||
// Add it directly to the visibleStatuses, don't change
|
|
||||||
// newStatusCount
|
newStatuses.forEach((statusId) => {
|
||||||
timeline.visibleStatusIds.add(statusId)
|
const seenBefore = this.checkSeenBefore(timeline, statusId)
|
||||||
} else {
|
if (!seenBefore) {
|
||||||
// Just change newStatuscount
|
if (showImmediately) {
|
||||||
timeline.newStatusCount += 1
|
// Add it directly to the visibleStatuses, don't change
|
||||||
}
|
// newStatusCount
|
||||||
|
timeline.visibleStatusIds.add(statusId)
|
||||||
} else {
|
} else {
|
||||||
timeline.ignoredIds.add(statusId)
|
// Just change newStatuscount
|
||||||
|
timeline.newStatusCount += 1
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
timeline.ignoredIds.add(statusId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue