about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers/status_container.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-11-16 05:16:39 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-10-08 20:49:02 +0200
commit870f0aae482f2aa8ce44c29acdbea7ded4655463 (patch)
treee9790751d5707522fd00c98fd494a8f6b2b0748a /app/javascript/flavours/glitch/containers/status_container.js
parent30f4268f325921c13f786e7f8d52d744ea542ef2 (diff)
[Glitch] Fix pop-out player appearing on mobile screens in web UI
Port 18ca4e0e9a3f74a6f21d329882b429f8f5227b0f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/containers/status_container.js')
-rw-r--r--app/javascript/flavours/glitch/containers/status_container.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js
index 0ba2e712c..370308043 100644
--- a/app/javascript/flavours/glitch/containers/status_container.js
+++ b/app/javascript/flavours/glitch/containers/status_container.js
@@ -76,12 +76,16 @@ const makeMapStateToProps = () => {
     }
 
     return {
-      containerId : props.containerId || props.id,  //  Should match reblogStatus's id for reblogs
-      status      : status,
-      account     : account || props.account,
-      settings    : state.get('local_settings'),
-      prepend     : prepend || props.prepend,
-      usingPiP    : state.get('picture_in_picture').statusId === props.id,
+      containerId: props.containerId || props.id,  //  Should match reblogStatus's id for reblogs
+      status: status,
+      account: account || props.account,
+      settings: state.get('local_settings'),
+      prepend: prepend || props.prepend,
+
+      pictureInPicture: {
+        inUse: state.getIn(['meta', 'layout']) !== 'mobile' && state.get('picture_in_picture').statusId === props.id,
+        available: state.getIn(['meta', 'layout']) !== 'mobile',
+      },
     };
   };