add option to enable auto visibility on secondary toot button

This commit is contained in:
Ash Levy
2018-07-08 21:24:51 -04:00
committed by ThibG
parent 7cb7ecaf7e
commit 6f06d16b1e
4 changed files with 13 additions and 1 deletions

View File

@ -67,7 +67,7 @@ function mapStateToProps (state) {
replyAccount: inReplyTo ? state.getIn(['statuses', inReplyTo, 'account']) : null,
replyContent: inReplyTo ? state.getIn(['statuses', inReplyTo, 'contentHtml']) : null,
resetFileKey: state.getIn(['compose', 'resetFileKey']),
sideArm: state.getIn(['local_settings', 'side_arm']),
sideArm: (state.getIn(['local_settings', 'side_arm_auto']) ? state.getIn(['compose', 'reply_privacy']) : null) || state.getIn(['local_settings', 'side_arm']),
sensitive: state.getIn(['compose', 'sensitive']),
showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),
spoiler: state.getIn(['compose', 'spoiler']),

View File

@ -76,6 +76,14 @@ export default class LocalSettingsPage extends React.PureComponent {
>
<FormattedMessage id='settings.side_arm' defaultMessage='Secondary toot button:' />
</LocalSettingsPageItem>
<LocalSettingsPageItem
settings={settings}
item={['side_arm_auto']}
id='mastodon-settings--side_arm_auto'
onChange={onChange}
>
<FormattedMessage id='settings.side_arm_auto' defaultMessage='Auto privacy for secondary toot button' />
</LocalSettingsPageItem>
</section>
</div>
),