|
|
@ -79,10 +79,8 @@ const messages = defineMessages({ |
|
|
|
uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' }, |
|
|
|
}); |
|
|
|
|
|
|
|
const COMPOSE_PANEL_BREAKPOINT = 600 + (285 * 1) + (10 * 1); |
|
|
|
|
|
|
|
export const ensureComposeIsVisible = (getState, routerHistory) => { |
|
|
|
if (!getState().getIn(['compose', 'mounted']) && window.innerWidth < COMPOSE_PANEL_BREAKPOINT) { |
|
|
|
if (!getState().getIn(['compose', 'mounted'])) { |
|
|
|
routerHistory.push('/publish'); |
|
|
|
} |
|
|
|
}; |
|
|
|