fix: update cache + timeline when items are updated/deleted (#556)
This commit is contained in:
parent
720b5114af
commit
dc76ab2477
5 changed files with 28 additions and 15 deletions
|
@ -36,6 +36,7 @@ const toggleTranslation = async () => {
|
|||
isLoading.translation = false
|
||||
}
|
||||
|
||||
const masto = useMasto()
|
||||
const copyLink = async (status: Status) => {
|
||||
const url = getStatusPermalinkRoute(status)
|
||||
if (url)
|
||||
|
@ -50,9 +51,10 @@ const deleteStatus = async () => {
|
|||
return
|
||||
}
|
||||
|
||||
await useMasto().statuses.remove(status.id)
|
||||
removeCachedStatus(status.id)
|
||||
await masto.statuses.remove(status.id)
|
||||
|
||||
if (route.name === '@account-status')
|
||||
if (route.name === 'status')
|
||||
router.back()
|
||||
|
||||
// TODO when timeline, remove this item
|
||||
|
@ -67,7 +69,8 @@ const deleteAndRedraft = async () => {
|
|||
return
|
||||
}
|
||||
|
||||
const { text } = await useMasto().statuses.remove(status.id)
|
||||
removeCachedStatus(status.id)
|
||||
const { text } = await masto.statuses.remove(status.id)
|
||||
openPublishDialog('dialog', await getDraftFromStatus(status, text), true)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue