From fe8407463a5a2d682e0f1715e20a74922555b8d7 Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 25 Jan 2022 15:34:40 -0500 Subject: [PATCH] fix floating player disappearing on small screens --- ui/component/fileRenderFloating/view.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/component/fileRenderFloating/view.jsx b/ui/component/fileRenderFloating/view.jsx index 781b5355a..ab1fc483c 100644 --- a/ui/component/fileRenderFloating/view.jsx +++ b/ui/component/fileRenderFloating/view.jsx @@ -12,7 +12,6 @@ import { PRIMARY_PLAYER_WRAPPER_CLASS } from 'page/file/view'; import Draggable from 'react-draggable'; import { onFullscreenChange } from 'util/full-screen'; import { generateListSearchUrlParams, formatLbryUrlForWeb } from 'util/url'; -import { useIsMobile } from 'effects/use-screensize'; import debounce from 'util/debounce'; import { useHistory } from 'react-router'; import { isURIEqual } from 'util/lbryURI'; @@ -127,7 +126,6 @@ export default function FileRenderFloating(props: Props) { const hideFloatingPlayer = location.state && location.state.hideFloatingPlayer; const playingUriSource = playingUri && playingUri.source; const isComment = playingUriSource === 'comment'; - const isMobile = useIsMobile(); const mainFilePlaying = !isFloating && primaryUri && isURIEqual(uri, primaryUri); const [fileViewerRect, setFileViewerRect] = useState(); @@ -291,7 +289,7 @@ export default function FileRenderFloating(props: Props) { if ( !isPlayable || !uri || - (isFloating && (isMobile || !floatingPlayerEnabled || hideFloatingPlayer)) || + (isFloating && (!floatingPlayerEnabled || hideFloatingPlayer)) || (collectionId && !isFloating && ((!canViewFile && !nextListUri) || countdownCanceled)) ) { return null;