feat(compose): More space on mobile devices (#4282)
* feat(compose): More space on mobile devices * feat(compose): Hide navigation when typing on mobile devices * fix(compose): Make animation faster * fix(navigation_bar): Remove hardcoded title * fix(compose): Prevent accidental bluring * fix(compose): Increase max-height to 600px
This commit is contained in:
parent
4b911fea03
commit
c1bc5e14eb
6 changed files with 114 additions and 3 deletions
|
@ -20,6 +20,7 @@ import {
|
|||
COMPOSE_SPOILERNESS_CHANGE,
|
||||
COMPOSE_SPOILER_TEXT_CHANGE,
|
||||
COMPOSE_VISIBILITY_CHANGE,
|
||||
COMPOSE_COMPOSING_CHANGE,
|
||||
COMPOSE_EMOJI_INSERT,
|
||||
} from '../actions/compose';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
|
@ -37,6 +38,7 @@ const initialState = ImmutableMap({
|
|||
focusDate: null,
|
||||
preselectDate: null,
|
||||
in_reply_to: null,
|
||||
is_composing: false,
|
||||
is_submitting: false,
|
||||
is_uploading: false,
|
||||
progress: 0,
|
||||
|
@ -146,7 +148,9 @@ export default function compose(state = initialState, action) {
|
|||
case COMPOSE_MOUNT:
|
||||
return state.set('mounted', true);
|
||||
case COMPOSE_UNMOUNT:
|
||||
return state.set('mounted', false);
|
||||
return state
|
||||
.set('mounted', false)
|
||||
.set('is_composing', false);
|
||||
case COMPOSE_SENSITIVITY_CHANGE:
|
||||
return state
|
||||
.set('sensitive', !state.get('sensitive'))
|
||||
|
@ -169,6 +173,8 @@ export default function compose(state = initialState, action) {
|
|||
return state
|
||||
.set('text', action.text)
|
||||
.set('idempotencyKey', uuid());
|
||||
case COMPOSE_COMPOSING_CHANGE:
|
||||
return state.set('is_composing', action.value);
|
||||
case COMPOSE_REPLY:
|
||||
return state.withMutations(map => {
|
||||
map.set('in_reply_to', action.status.get('id'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue