remove related dispatches

This commit is contained in:
Henry Jameson 2026-08-20 21:00:36 +03:00
commit ae5984d2f1
29 changed files with 260 additions and 236 deletions

View file

@ -1,6 +1,7 @@
import { map } from 'lodash'
import { useStatusesStore } from 'src/stores/statuses.js'
import { useTimelinesStore } from 'src/stores/timelines.js'
import { useUsersStore } from 'src/stores/users.js'
import {
@ -75,10 +76,13 @@ const editStatus = ({
mediaIds,
contentType,
})
.then(({ data }) => {
store.dispatch('addNewStatuses', {
.then(({ data, timestamp }) => {
useStatusesStore().addNewStatuses({
statuses: [data],
timestamp,
})
useTimelinesStore().addStatusesToTimeline('friends', undefined, {
statuses: [data],
timeline: 'friends',
showImmediately: true,
noIdUpdate: true, // To prevent missing notices on next pull.
})