unmount on end

This commit is contained in:
Rafael 2022-03-15 13:48:57 -03:00 committed by Thomas Zarebczan
parent b7f9152dca
commit 93b70f5e92
2 changed files with 6 additions and 1 deletions

View file

@ -22,6 +22,7 @@ import { selectIsActiveLivestreamForUri, selectCommentSocketConnected } from 're
import { doSetMobilePlayerDimensions } from 'redux/actions/app'; import { doSetMobilePlayerDimensions } from 'redux/actions/app';
import { doCommentSocketConnect, doCommentSocketDisconnect } from 'redux/actions/websocket'; import { doCommentSocketConnect, doCommentSocketDisconnect } from 'redux/actions/websocket';
import { doSetSocketConnected } from 'redux/actions/livestream'; import { doSetSocketConnected } from 'redux/actions/livestream';
import { isStreamPlaceholderClaim } from 'util/claim';
import FileRenderFloating from './view'; import FileRenderFloating from './view';
const select = (state, props) => { const select = (state, props) => {
@ -54,6 +55,7 @@ const select = (state, props) => {
isCurrentClaimLive: selectIsActiveLivestreamForUri(state, uri), isCurrentClaimLive: selectIsActiveLivestreamForUri(state, uri),
mobilePlayerDimensions: selectMobilePlayerDimensions(state), mobilePlayerDimensions: selectMobilePlayerDimensions(state),
socketConnected: selectCommentSocketConnected(state), socketConnected: selectCommentSocketConnected(state),
isLivestreamClaim: isStreamPlaceholderClaim(claim),
}; };
}; };

View file

@ -57,6 +57,7 @@ type Props = {
isCurrentClaimLive?: boolean, isCurrentClaimLive?: boolean,
mobilePlayerDimensions?: any, mobilePlayerDimensions?: any,
socketConnected: boolean, socketConnected: boolean,
isLivestreamClaim: boolean,
doSetMobilePlayerDimensions: ({ height?: ?number, width?: ?number }) => void, doSetMobilePlayerDimensions: ({ height?: ?number, width?: ?number }) => void,
doCommentSocketConnect: (string, string, string) => void, doCommentSocketConnect: (string, string, string) => void,
doCommentSocketDisconnect: (string, string) => void, doCommentSocketDisconnect: (string, string) => void,
@ -82,6 +83,7 @@ export default function FileRenderFloating(props: Props) {
nextListUri, nextListUri,
previousListUri, previousListUri,
socketConnected, socketConnected,
isLivestreamClaim,
doFetchRecommendedContent, doFetchRecommendedContent,
doUriInitiatePlay, doUriInitiatePlay,
doSetPlayingUri, doSetPlayingUri,
@ -283,7 +285,8 @@ export default function FileRenderFloating(props: Props) {
!isPlayable || !isPlayable ||
!uri || !uri ||
(isFloating && noFloatingPlayer) || (isFloating && noFloatingPlayer) ||
(collectionId && !isFloating && ((!canViewFile && !nextListUri) || countdownCanceled)) (collectionId && !isFloating && ((!canViewFile && !nextListUri) || countdownCanceled)) ||
(isLivestreamClaim && !isCurrentClaimLive)
) { ) {
return null; return null;
} }