Fix "delete & redraft" to pop up modal, fixes #71

This commit is contained in:
Alex Gleason 2019-08-07 15:49:16 -04:00
parent 05037f60be
commit d694d4a1a7
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import { evictStatus } from '../storage/modifier';
import { deleteFromTimelines } from './timelines';
import { importFetchedStatus, importFetchedStatuses, importAccount, importStatus } from './importer';
import { ensureComposeIsVisible } from './compose';
import { openModal, closeModal } from './modal';
import { me } from 'gabsocial/initial_state';
export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST';
@ -159,7 +160,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
if (withRedraft) {
dispatch(redraft(status, response.data.text));
ensureComposeIsVisible(getState, routerHistory);
dispatch(openModal('COMPOSE'));
}
}).catch(error => {
dispatch(deleteStatusFail(id, error));