Need to save status after edit

Before this, the status (and context) will auto-refresh after posting, but now it's only refreshing context
This commit is contained in:
Lim Chee Aun 2023-02-10 11:35:47 +08:00
parent 14c994c7ba
commit 8b77615c80

View file

@ -16,7 +16,7 @@ import { api } from '../utils/api';
import db from '../utils/db'; import db from '../utils/db';
import emojifyText from '../utils/emojify-text'; import emojifyText from '../utils/emojify-text';
import openCompose from '../utils/open-compose'; import openCompose from '../utils/open-compose';
import states from '../utils/states'; import states, { saveStatus } from '../utils/states';
import store from '../utils/store'; import store from '../utils/store';
import { getCurrentAccount, getCurrentAccountNS } from '../utils/store-utils'; import { getCurrentAccount, getCurrentAccountNS } from '../utils/store-utils';
import useInterval from '../utils/useInterval'; import useInterval from '../utils/useInterval';
@ -785,6 +785,9 @@ function Compose({
editStatus.id, editStatus.id,
params, params,
); );
saveStatus(newStatus, {
skipThreading: true,
});
} else { } else {
newStatus = await masto.v1.statuses.create(params, { newStatus = await masto.v1.statuses.create(params, {
idempotencyKey: UID.current, idempotencyKey: UID.current,