mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 14:28:10 +09:00
fix: deduplicate incoming statuses
This commit is contained in:
parent
34dc2f7736
commit
d585d4eeb7
@ -28,6 +28,10 @@ export function usePaginator<T>(
|
||||
if ('uri' in status)
|
||||
cacheStatus(status, undefined, true)
|
||||
|
||||
const index = prevItems.value.findIndex((i: any) => i.id === status.id)
|
||||
if (index >= 0)
|
||||
prevItems.value.splice(index, 1)
|
||||
|
||||
prevItems.value.unshift(status as any)
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user