mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-21 17:05:22 +03:00
fix: can't refresh statuses after delete a status in account/index page, #2546
This commit is contained in:
parent
cadf1b4a7c
commit
f43317fd94
2 changed files with 7 additions and 1 deletions
|
@ -62,6 +62,11 @@ export function usePaginator<T, P, U = T>(
|
||||||
removeCachedStatus(id)
|
removeCachedStatus(id)
|
||||||
|
|
||||||
const data = items.value as mastodon.v1.Status[]
|
const data = items.value as mastodon.v1.Status[]
|
||||||
|
|
||||||
|
const prevItemsIndex = prevItems.value.findIndex((i: any) => i.id === id)
|
||||||
|
if (prevItemsIndex >= 0)
|
||||||
|
prevItems.value.splice(prevItemsIndex, 1)
|
||||||
|
|
||||||
const index = data.findIndex(s => s.id === id)
|
const index = data.findIndex(s => s.id === id)
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
data.splice(index, 1)
|
data.splice(index, 1)
|
||||||
|
|
|
@ -21,11 +21,12 @@ if (account) {
|
||||||
title: () => `${t('account.posts')} | ${getDisplayName(account)} (@${account.acct})`,
|
title: () => `${t('account.posts')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const stream = useStreaming(client => client.user.subscribe())
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<AccountTabs />
|
<AccountTabs />
|
||||||
<TimelinePaginator :paginator="paginator" :preprocess="reorderAndFilter" context="account" :account="account" />
|
<TimelinePaginator :paginator="paginator" :preprocess="reorderAndFilter" context="account" :account="account" :stream="stream" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue