Re-add unlisted toggle to the UI

This commit is contained in:
Anthony Bellew 2016-12-23 07:20:16 -07:00 committed by Eugen Rochko
parent 6e064cf715
commit 538d109a82
4 changed files with 34 additions and 4 deletions

View file

@ -17,7 +17,8 @@ import {
COMPOSE_SUGGESTIONS_READY,
COMPOSE_SUGGESTION_SELECT,
COMPOSE_SENSITIVITY_CHANGE,
COMPOSE_VISIBILITY_CHANGE
COMPOSE_VISIBILITY_CHANGE,
COMPOSE_LISTABILITY_CHANGE
} from '../actions/compose';
import { TIMELINE_DELETE } from '../actions/timelines';
import { ACCOUNT_SET_SELF } from '../actions/accounts';
@ -26,6 +27,7 @@ import Immutable from 'immutable';
const initialState = Immutable.Map({
mounted: false,
sensitive: false,
unlisted: false,
private: false,
text: '',
in_reply_to: null,
@ -93,6 +95,8 @@ export default function compose(state = initialState, action) {
return state.set('sensitive', action.checked);
case COMPOSE_VISIBILITY_CHANGE:
return state.set('private', action.checked);
case COMPOSE_LISTABILITY_CHANGE:
return state.set('unlisted', action.checked);
case COMPOSE_CHANGE:
return state.set('text', action.text);
case COMPOSE_REPLY: