|
|
|
|
@ -109,7 +109,7 @@ export function fetchStatusFail(id, error, skipLoading, parentQuotePostId) {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function redraft(status, raw_text) {
|
|
|
|
|
export function redraft(status, raw_text, quoted_status_id = null) {
|
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
|
const maxOptions = getState().server.getIn(['server', 'configuration', 'polls', 'max_options']);
|
|
|
|
|
|
|
|
|
|
@ -117,6 +117,7 @@ export function redraft(status, raw_text) {
|
|
|
|
|
type: REDRAFT,
|
|
|
|
|
status,
|
|
|
|
|
raw_text,
|
|
|
|
|
quoted_status_id,
|
|
|
|
|
maxOptions,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
@ -169,7 +170,7 @@ export function deleteStatus(id, withRedraft = false) {
|
|
|
|
|
dispatch(importFetchedAccount(response.data.account));
|
|
|
|
|
|
|
|
|
|
if (withRedraft) {
|
|
|
|
|
dispatch(redraft(status, response.data.text));
|
|
|
|
|
dispatch(redraft(status, response.data.text, response.data.quote?.quoted_status?.id));
|
|
|
|
|
ensureComposeIsVisible(getState);
|
|
|
|
|
} else {
|
|
|
|
|
dispatch(showAlert({ message: messages.deleteSuccess }));
|
|
|
|
|
|