Threaded mode~

This commit is contained in:
kibigo!
2018-01-05 18:23:06 -08:00
parent 6932b464e6
commit e4bc013d6f
9 changed files with 157 additions and 48 deletions

View File

@ -61,7 +61,7 @@ export function replyCompose(status, router) {
status: status,
});
if (!getState().getIn(['compose', 'mounted'])) {
if (router && !getState().getIn(['compose', 'mounted'])) {
router.push('/statuses/new');
}
};
@ -118,6 +118,11 @@ export function submitCompose() {
}).then(function (response) {
dispatch(submitComposeSuccess({ ...response.data }));
// If the response has no data then we can't do anything else.
if (!response.data) {
return;
}
// To make the app more responsive, immediately get the status into the columns
const insertOrRefresh = (timelineId, refreshAction) => {
@ -341,10 +346,11 @@ export function unmountCompose() {
};
};
export function toggleComposeAdvancedOption(option) {
export function changeComposeAdvancedOption(option, value) {
return {
option,
type: COMPOSE_ADVANCED_OPTIONS_CHANGE,
option: option,
value,
};
}