fix: deduplicate incoming statuses

This commit is contained in:
Daniel Roe 2022-12-28 17:21:58 +01:00
parent 34dc2f7736
commit d585d4eeb7
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55

View file

@ -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)
})