Add setting to disable the pop-in player

This commit is contained in:
Thibaut Girka
2020-10-26 20:11:35 +01:00
parent 5ee2b860f9
commit ea5298ab9b
3 changed files with 14 additions and 1 deletions

View File

@ -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));
}
});
},
});