diff --git a/ui/component/claimPreview/index.js b/ui/component/claimPreview/index.js index c35b0c8ce..832004474 100644 --- a/ui/component/claimPreview/index.js +++ b/ui/component/claimPreview/index.js @@ -20,6 +20,7 @@ import { } from 'lbry-redux'; import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked'; import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; +import { makeSelectIsActiveLivestream } from 'redux/selectors/livestream'; import { selectShowMatureContent } from 'redux/selectors/settings'; import { makeSelectHasVisitedUri } from 'redux/selectors/content'; import { makeSelectIsSubscribed } from 'redux/selectors/subscriptions'; @@ -56,6 +57,7 @@ const select = (state, props) => { streamingUrl: props.uri && makeSelectStreamingUrlForUri(props.uri)(state), wasPurchased: props.uri && makeSelectClaimWasPurchased(props.uri)(state), isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), + isLivestreamActive: makeSelectIsActiveLivestream(props.uri)(state), isCollectionMine: makeSelectCollectionIsMine(props.collectionId)(state), collectionUris: makeSelectUrlsForCollectionId(props.collectionId)(state), collectionIndex: makeSelectIndexForUrlInCollection(props.uri, props.collectionId)(state), diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index 22f3812db..343424d5f 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -80,7 +80,7 @@ type Props = { repostUrl?: string, hideMenu?: boolean, isLivestream?: boolean, - live?: boolean, + isLivestreamActive: boolean, collectionId?: string, editCollection: (string, CollectionEditParams) => void, isCollectionMine: boolean, @@ -145,7 +145,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { hideMenu = false, // repostUrl, isLivestream, // need both? CHECK - live, + isLivestreamActive, collectionId, collectionIndex, editCollection, @@ -336,7 +336,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { } let liveProperty = null; - if (live === true) { + if (isLivestreamActive === true) { liveProperty = (claim) => <>LIVE; } @@ -349,7 +349,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { 'claim-preview__wrapper--channel': isChannelUri && type !== 'inline', 'claim-preview__wrapper--inline': type === 'inline', 'claim-preview__wrapper--small': type === 'small', - 'claim-preview__live': live, + 'claim-preview__live': isLivestreamActive, 'claim-preview__active': active, })} > @@ -386,7 +386,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { )} {/* @endif */} - {!isLivestream && ( + {(!isLivestream || isLivestreamActive) && (
diff --git a/ui/component/claimPreviewTile/index.js b/ui/component/claimPreviewTile/index.js index 6bfa3760d..e9372e4eb 100644 --- a/ui/component/claimPreviewTile/index.js +++ b/ui/component/claimPreviewTile/index.js @@ -13,6 +13,7 @@ import { } from 'lbry-redux'; import { selectMutedChannels } from 'redux/selectors/blocked'; import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; +import { makeSelectIsActiveLivestream } from 'redux/selectors/livestream'; import { selectShowMatureContent } from 'redux/selectors/settings'; import ClaimPreviewTile from './view'; import formatMediaDuration from 'util/formatMediaDuration'; @@ -36,6 +37,7 @@ const select = (state, props) => { showMature: selectShowMatureContent(state), isMature: makeSelectClaimIsNsfw(props.uri)(state), isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), + isLivestreamActive: makeSelectIsActiveLivestream(props.uri)(state), }; }; diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx index 1372e5918..235b86e4b 100644 --- a/ui/component/claimPreviewTile/view.jsx +++ b/ui/component/claimPreviewTile/view.jsx @@ -48,10 +48,10 @@ type Props = { showMature: boolean, showHiddenByUser?: boolean, properties?: (Claim) => void, - live?: boolean, collectionId?: string, showNoSourceClaims?: boolean, isLivestream: boolean, + isLivestreamActive: boolean, }; // preview image cards used in related video functionality @@ -75,9 +75,9 @@ function ClaimPreviewTile(props: Props) { showMature, showHiddenByUser, properties, - live, showNoSourceClaims, isLivestream, + isLivestreamActive, collectionId, mediaDuration, } = props; @@ -192,7 +192,7 @@ function ClaimPreviewTile(props: Props) { } let liveProperty = null; - if (live === true) { + if (isLivestreamActive === true) { liveProperty = (claim) => <>LIVE; } @@ -201,7 +201,7 @@ function ClaimPreviewTile(props: Props) { onClick={handleClick} className={classnames('card claim-preview--tile', { 'claim-preview__wrapper--channel': isChannel, - 'claim-preview__live': live, + 'claim-preview__live': isLivestreamActive, })} >