mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-30 17:01:25 +00:00
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,
|
showHiddenByUser?: boolean,
|
||||||
liveLivestreamsFirst?: boolean,
|
liveLivestreamsFirst?: boolean,
|
||||||
livestreamMap?: { [string]: any },
|
livestreamMap?: { [string]: any },
|
||||||
|
hasSource?: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
function ClaimListDiscover(props: Props) {
|
function ClaimListDiscover(props: Props) {
|
||||||
|
@ -123,6 +124,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
showHiddenByUser = false,
|
showHiddenByUser = false,
|
||||||
liveLivestreamsFirst,
|
liveLivestreamsFirst,
|
||||||
livestreamMap,
|
livestreamMap,
|
||||||
|
hasSource,
|
||||||
} = props;
|
} = props;
|
||||||
const didNavigateForward = history.action === 'PUSH';
|
const didNavigateForward = history.action === 'PUSH';
|
||||||
const { search } = location;
|
const { search } = location;
|
||||||
|
@ -228,7 +230,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
: 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;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,7 @@ type Props = {
|
||||||
timestamp?: string,
|
timestamp?: string,
|
||||||
feeAmount?: string,
|
feeAmount?: string,
|
||||||
limitClaimsPerChannel?: number,
|
limitClaimsPerChannel?: number,
|
||||||
|
hasSource?: boolean,
|
||||||
hasNoSource?: boolean,
|
hasNoSource?: boolean,
|
||||||
renderProperties?: (Claim) => ?Node,
|
renderProperties?: (Claim) => ?Node,
|
||||||
liveLivestreamsFirst?: boolean,
|
liveLivestreamsFirst?: boolean,
|
||||||
|
@ -139,6 +140,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
feeAmount,
|
feeAmount,
|
||||||
limitClaimsPerChannel,
|
limitClaimsPerChannel,
|
||||||
fetchingClaimSearchByQuery,
|
fetchingClaimSearchByQuery,
|
||||||
|
hasSource,
|
||||||
hasNoSource,
|
hasNoSource,
|
||||||
renderProperties,
|
renderProperties,
|
||||||
blockedUris,
|
blockedUris,
|
||||||
|
@ -189,7 +191,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
|
|
||||||
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
if (ENABLE_NO_SOURCE_CLAIMS && hasNoSource) {
|
||||||
options.has_no_source = true;
|
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;
|
options.has_source = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ function ChannelsFollowingPage(props: Props) {
|
||||||
}
|
}
|
||||||
liveLivestreamsFirst
|
liveLivestreamsFirst
|
||||||
livestreamMap={livestreamMap}
|
livestreamMap={livestreamMap}
|
||||||
|
hasSource
|
||||||
/>
|
/>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
|
@ -152,6 +152,7 @@ function DiscoverPage(props: Props) {
|
||||||
}
|
}
|
||||||
liveLivestreamsFirst
|
liveLivestreamsFirst
|
||||||
livestreamMap={livestreamMap}
|
livestreamMap={livestreamMap}
|
||||||
|
hasSource
|
||||||
/>
|
/>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
|
@ -93,7 +93,7 @@ function HomePage(props: Props) {
|
||||||
</h1>
|
</h1>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ClaimTilesDiscover {...options} liveLivestreamsFirst livestreamMap={livestreamMap} />
|
<ClaimTilesDiscover {...options} liveLivestreamsFirst livestreamMap={livestreamMap} hasSource />
|
||||||
{(route || link) && (
|
{(route || link) && (
|
||||||
<Button
|
<Button
|
||||||
className="claim-grid__title--secondary"
|
className="claim-grid__title--secondary"
|
||||||
|
|
Loading…
Add table
Reference in a new issue