Commit 3e43d062 authored by Developer's avatar Developer 🥊

Merge branch 'delete-redraft' into 'develop'

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

Closes #71

See merge request gab/social/gab-social!39
parents 2332aa16 d694d4a1
...@@ -4,6 +4,7 @@ import { evictStatus } from '../storage/modifier'; ...@@ -4,6 +4,7 @@ import { evictStatus } from '../storage/modifier';
import { deleteFromTimelines } from './timelines'; import { deleteFromTimelines } from './timelines';
import { importFetchedStatus, importFetchedStatuses, importAccount, importStatus } from './importer'; import { importFetchedStatus, importFetchedStatuses, importAccount, importStatus } from './importer';
import { ensureComposeIsVisible } from './compose'; import { ensureComposeIsVisible } from './compose';
import { openModal, closeModal } from './modal';
import { me } from 'gabsocial/initial_state'; import { me } from 'gabsocial/initial_state';
export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST'; export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST';
...@@ -159,7 +160,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) { ...@@ -159,7 +160,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
if (withRedraft) { if (withRedraft) {
dispatch(redraft(status, response.data.text)); dispatch(redraft(status, response.data.text));
ensureComposeIsVisible(getState, routerHistory); dispatch(openModal('COMPOSE'));
} }
}).catch(error => { }).catch(error => {
dispatch(deleteStatusFail(id, error)); dispatch(deleteStatusFail(id, error));
...@@ -272,7 +273,7 @@ export function muteStatusFail(id, error) { ...@@ -272,7 +273,7 @@ export function muteStatusFail(id, error) {
export function unmuteStatus(id) { export function unmuteStatus(id) {
return (dispatch, getState) => { return (dispatch, getState) => {
if (!me) return; if (!me) return;
dispatch(unmuteStatusRequest(id)); dispatch(unmuteStatusRequest(id));
api(getState).post(`/api/v1/statuses/${id}/unmute`).then(() => { api(getState).post(`/api/v1/statuses/${id}/unmute`).then(() => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment