mirror of
https://iceshrimp.dev/blueb/Chuckya-fe-standalone.git
synced 2026-01-11 13:33:21 -08:00
[Glitch] Remove routerHistory parameters from composer actions
Port e768b23aa9 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
9f05a06dee
commit
95984b729a
18 changed files with 94 additions and 104 deletions
|
|
@ -94,7 +94,7 @@ export function redraft(status, raw_text, content_type) {
|
|||
};
|
||||
}
|
||||
|
||||
export const editStatus = (id, routerHistory) => (dispatch, getState) => {
|
||||
export const editStatus = (id) => (dispatch, getState) => {
|
||||
let status = getState().getIn(['statuses', id]);
|
||||
|
||||
if (status.get('poll')) {
|
||||
|
|
@ -105,7 +105,7 @@ export const editStatus = (id, routerHistory) => (dispatch, getState) => {
|
|||
|
||||
api().get(`/api/v1/statuses/${id}/source`).then(response => {
|
||||
dispatch(fetchStatusSourceSuccess());
|
||||
ensureComposeIsVisible(getState, routerHistory);
|
||||
ensureComposeIsVisible(getState);
|
||||
dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text, response.data.content_type));
|
||||
}).catch(error => {
|
||||
dispatch(fetchStatusSourceFail(error));
|
||||
|
|
@ -125,7 +125,7 @@ export const fetchStatusSourceFail = error => ({
|
|||
error,
|
||||
});
|
||||
|
||||
export function deleteStatus(id, routerHistory, withRedraft = false) {
|
||||
export function deleteStatus(id, withRedraft = false) {
|
||||
return (dispatch, getState) => {
|
||||
let status = getState().getIn(['statuses', id]);
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
|
|||
|
||||
if (withRedraft) {
|
||||
dispatch(redraft(status, response.data.text, response.data.content_type));
|
||||
ensureComposeIsVisible(getState, routerHistory);
|
||||
ensureComposeIsVisible(getState);
|
||||
}
|
||||
}).catch(error => {
|
||||
dispatch(deleteStatusFail(id, error));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue