Fix: Delete end edit on Markdown post loses Markdown setting

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
remove-makegetotheraccounts
marcin mikołajczak 2022-03-13 21:09:58 +01:00
rodzic fcded3aae6
commit b003ac0634
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -97,7 +97,7 @@ export function fetchStatus(id) {
};
}
export function redraft(status, raw_text) {
export function redraft(status, raw_text, content_type) {
return (dispatch, getState) => {
const state = getState();
const instance = state.get('instance');
@ -108,6 +108,7 @@ export function redraft(status, raw_text) {
status,
raw_text,
explicitAddressing,
content_type,
});
};
}
@ -129,7 +130,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
dispatch(deleteFromTimelines(id));
if (withRedraft) {
dispatch(redraft(status, response.data.text));
dispatch(redraft(status, response.data.text, response.data.pleroma?.content_type));
dispatch(openModal('COMPOSE'));
}
}).catch(error => {

Wyświetl plik

@ -436,7 +436,7 @@ export default function compose(state = initialState, action) {
map.set('focusDate', new Date());
map.set('caretPosition', null);
map.set('idempotencyKey', uuid());
map.set('content_type', action.status.get('content_type'));
map.set('content_type', action.content_type || 'text/plain');
if (action.status.get('spoiler_text').length > 0) {
map.set('spoiler', true);