about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-10-26 20:11:35 +0100
committerThibaut Girka <thib@sitedethib.com>2020-10-26 20:31:54 +0100
commitea5298ab9b4b989119218807281b68d19756cd7a (patch)
tree1342afdc12154d97365a3efb792efcd3c1fa059c /app/javascript/flavours/glitch/containers
parent5ee2b860f902871c1f38ae0e9b8f333b38c73bbe (diff)
Add setting to disable the pop-in player
Diffstat (limited to 'app/javascript/flavours/glitch/containers')
-rw-r--r--app/javascript/flavours/glitch/containers/status_container.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js
index 48b0d8255..ac423c58d 100644
--- a/app/javascript/flavours/glitch/containers/status_container.js
+++ b/app/javascript/flavours/glitch/containers/status_container.js
@@ -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));
+      }
+    });
   },
 
 });