From 2112a81e869fe342d7351b1fb1951df754a5d255 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 23 Nov 2016 18:53:23 +0100 Subject: Adding content sensitivity toggle, spoilers for media --- app/assets/javascripts/components/reducers/compose.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/components/reducers') diff --git a/app/assets/javascripts/components/reducers/compose.jsx b/app/assets/javascripts/components/reducers/compose.jsx index e6e86d4f5..4abc3e6aa 100644 --- a/app/assets/javascripts/components/reducers/compose.jsx +++ b/app/assets/javascripts/components/reducers/compose.jsx @@ -15,7 +15,8 @@ import { COMPOSE_UPLOAD_PROGRESS, COMPOSE_SUGGESTIONS_CLEAR, COMPOSE_SUGGESTIONS_READY, - COMPOSE_SUGGESTION_SELECT + COMPOSE_SUGGESTION_SELECT, + COMPOSE_SENSITIVITY_CHANGE } from '../actions/compose'; import { TIMELINE_DELETE } from '../actions/timelines'; import { ACCOUNT_SET_SELF } from '../actions/accounts'; @@ -23,6 +24,7 @@ import Immutable from 'immutable'; const initialState = Immutable.Map({ mounted: false, + sensitive: false, text: '', in_reply_to: null, is_submitting: false, @@ -87,6 +89,8 @@ export default function compose(state = initialState, action) { return state.set('mounted', true); case COMPOSE_UNMOUNT: return state.set('mounted', false); + case COMPOSE_SENSITIVITY_CHANGE: + return state.set('sensitive', action.checked); case COMPOSE_CHANGE: return state.set('text', action.text); case COMPOSE_REPLY: -- cgit