mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 17:14:15 -05:00
Add setting to disable the pop-in player
This commit is contained in:
parent
5ee2b860f9
commit
ea5298ab9b
@ -248,7 +248,11 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
|
||||
},
|
||||
|
||||
deployPictureInPicture (status, type, mediaProps) {
|
||||
dispatch(deployPictureInPicture(status.get('id'), status.getIn(['account', 'id']), type, mediaProps));
|
||||
dispatch((_, getState) => {
|
||||
if (getState().getIn(['local_settings', 'media', 'pop_in_player'])) {
|
||||
dispatch(deployPictureInPicture(status.get('id'), status.getIn(['account', 'id']), type, mediaProps));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
@ -420,6 +420,14 @@ class LocalSettingsPage extends React.PureComponent {
|
||||
>
|
||||
<FormattedMessage id='settings.media_reveal_behind_cw' defaultMessage='Reveal sensitive media behind a CW by default' />
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['media', 'pop_in_player']}
|
||||
id='mastodon-settings--pop-in-player'
|
||||
onChange={onChange}
|
||||
>
|
||||
<FormattedMessage id='settings.pop_in_player' defaultMessage='Enable pop-in player' />
|
||||
</LocalSettingsPageItem>
|
||||
</div>
|
||||
),
|
||||
];
|
||||
|
@ -49,6 +49,7 @@ const initialState = ImmutableMap({
|
||||
letterbox : true,
|
||||
fullwidth : true,
|
||||
reveal_behind_cw : false,
|
||||
pop_in_player : true,
|
||||
}),
|
||||
notifications : ImmutableMap({
|
||||
favicon_badge : false,
|
||||
|
Loading…
Reference in New Issue
Block a user