Homepage|Discover: hide livestreams, then append active livestreams at the top.
This essentially hides inactive livestreams from the list.
This commit is contained in:
parent
0258c2d3c3
commit
742110c81c
5 changed files with 9 additions and 3 deletions
|
@ -70,6 +70,7 @@ type Props = {
|
|||
showHiddenByUser?: boolean,
|
||||
liveLivestreamsFirst?: boolean,
|
||||
livestreamMap?: { [string]: any },
|
||||
hasSource?: boolean,
|
||||
};
|
||||
|
||||
function ClaimListDiscover(props: Props) {
|
||||
|
@ -123,6 +124,7 @@ function ClaimListDiscover(props: Props) {
|
|||
showHiddenByUser = false,
|
||||
liveLivestreamsFirst,
|
||||
livestreamMap,
|
||||
hasSource,
|
||||
} = props;
|
||||
const didNavigateForward = history.action === 'PUSH';
|
||||
const { search } = location;
|
||||
|
@ -228,7 +230,7 @@ function ClaimListDiscover(props: Props) {
|
|||
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
||||
};
|
||||
|
||||
if (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === CS.CLAIM_STREAM)) {
|
||||
if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === CS.CLAIM_STREAM))) {
|
||||
options.has_source = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,6 +111,7 @@ type Props = {
|
|||
timestamp?: string,
|
||||
feeAmount?: string,
|
||||
limitClaimsPerChannel?: number,
|
||||
hasSource?: boolean,
|
||||
hasNoSource?: boolean,
|
||||
renderProperties?: (Claim) => ?Node,
|
||||
liveLivestreamsFirst?: boolean,
|
||||
|
@ -139,6 +140,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
feeAmount,
|
||||
limitClaimsPerChannel,
|
||||
fetchingClaimSearchByQuery,
|
||||
hasSource,
|
||||
hasNoSource,
|
||||
renderProperties,
|
||||
blockedUris,
|
||||
|
@ -189,7 +191,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
|
||||
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
||||
options.has_no_source = true;
|
||||
} else if (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream')) {
|
||||
} else if (hasSource || (!ENABLE_NO_SOURCE_CLAIMS && (!claimType || claimType === 'stream'))) {
|
||||
options.has_source = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ function ChannelsFollowingPage(props: Props) {
|
|||
}
|
||||
liveLivestreamsFirst
|
||||
livestreamMap={livestreamMap}
|
||||
hasSource
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
|
|
|
@ -152,6 +152,7 @@ function DiscoverPage(props: Props) {
|
|||
}
|
||||
liveLivestreamsFirst
|
||||
livestreamMap={livestreamMap}
|
||||
hasSource
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
|
|
|
@ -93,7 +93,7 @@ function HomePage(props: Props) {
|
|||
</h1>
|
||||
)}
|
||||
|
||||
<ClaimTilesDiscover {...options} liveLivestreamsFirst livestreamMap={livestreamMap} />
|
||||
<ClaimTilesDiscover {...options} liveLivestreamsFirst livestreamMap={livestreamMap} hasSource />
|
||||
{(route || link) && (
|
||||
<Button
|
||||
className="claim-grid__title--secondary"
|
||||
|
|
Loading…
Reference in a new issue