unmount on end
This commit is contained in:
parent
b7f9152dca
commit
93b70f5e92
2 changed files with 6 additions and 1 deletions
|
@ -22,6 +22,7 @@ import { selectIsActiveLivestreamForUri, selectCommentSocketConnected } from 're
|
|||
import { doSetMobilePlayerDimensions } from 'redux/actions/app';
|
||||
import { doCommentSocketConnect, doCommentSocketDisconnect } from 'redux/actions/websocket';
|
||||
import { doSetSocketConnected } from 'redux/actions/livestream';
|
||||
import { isStreamPlaceholderClaim } from 'util/claim';
|
||||
import FileRenderFloating from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
|
@ -54,6 +55,7 @@ const select = (state, props) => {
|
|||
isCurrentClaimLive: selectIsActiveLivestreamForUri(state, uri),
|
||||
mobilePlayerDimensions: selectMobilePlayerDimensions(state),
|
||||
socketConnected: selectCommentSocketConnected(state),
|
||||
isLivestreamClaim: isStreamPlaceholderClaim(claim),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ type Props = {
|
|||
isCurrentClaimLive?: boolean,
|
||||
mobilePlayerDimensions?: any,
|
||||
socketConnected: boolean,
|
||||
isLivestreamClaim: boolean,
|
||||
doSetMobilePlayerDimensions: ({ height?: ?number, width?: ?number }) => void,
|
||||
doCommentSocketConnect: (string, string, string) => void,
|
||||
doCommentSocketDisconnect: (string, string) => void,
|
||||
|
@ -82,6 +83,7 @@ export default function FileRenderFloating(props: Props) {
|
|||
nextListUri,
|
||||
previousListUri,
|
||||
socketConnected,
|
||||
isLivestreamClaim,
|
||||
doFetchRecommendedContent,
|
||||
doUriInitiatePlay,
|
||||
doSetPlayingUri,
|
||||
|
@ -283,7 +285,8 @@ export default function FileRenderFloating(props: Props) {
|
|||
!isPlayable ||
|
||||
!uri ||
|
||||
(isFloating && noFloatingPlayer) ||
|
||||
(collectionId && !isFloating && ((!canViewFile && !nextListUri) || countdownCanceled))
|
||||
(collectionId && !isFloating && ((!canViewFile && !nextListUri) || countdownCanceled)) ||
|
||||
(isLivestreamClaim && !isCurrentClaimLive)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue