Re-add unlisted toggle to the UI
This commit is contained in:
parent
6e064cf715
commit
538d109a82
4 changed files with 34 additions and 4 deletions
|
@ -24,6 +24,7 @@ export const COMPOSE_UNMOUNT = 'COMPOSE_UNMOUNT';
|
|||
|
||||
export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE';
|
||||
export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE';
|
||||
export const COMPOSE_LISTABILITY_CHANGE = 'COMPOSE_LISTABILITY_CHANGE';
|
||||
|
||||
export function changeCompose(text) {
|
||||
return {
|
||||
|
@ -67,7 +68,7 @@ export function submitCompose() {
|
|||
in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
|
||||
media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id')),
|
||||
sensitive: getState().getIn(['compose', 'sensitive']),
|
||||
visibility: getState().getIn(['compose', 'private']) ? 'private' : 'public'
|
||||
visibility: getState().getIn(['compose', 'private']) ? 'private' : (getState().getIn(['compose', 'unlisted']) ? 'unlisted' : 'public')
|
||||
}).then(function (response) {
|
||||
dispatch(submitComposeSuccess({ ...response.data }));
|
||||
|
||||
|
@ -223,3 +224,10 @@ export function changeComposeVisibility(checked) {
|
|||
checked
|
||||
};
|
||||
};
|
||||
|
||||
export function changeComposeListability(checked) {
|
||||
return {
|
||||
type: COMPOSE_LISTABILITY_CHANGE,
|
||||
checked
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue