ClaimPreviewTiles: hide abandoned tiles by default
## Ticket 1308, 1363 - "Hide/skip "removed" recsys entries" ## Change Ported the `isAbandoned` handling from the list-layout to the tile-layout (yet another grumble on why tile vs. list is not just a css difference but an entire different component). ## Misc Because "ClaimList + tileLayout" was showing abandoned claims by default, search around to see if it was still needed. I think only collectionsListMine would require that (or maybe not, can remove later).
This commit is contained in:
parent
cbb6e2afe4
commit
f2a63668b7
3 changed files with 10 additions and 2 deletions
|
@ -231,6 +231,7 @@ export default function ClaimList(props: Props) {
|
||||||
<ClaimPreviewTile
|
<ClaimPreviewTile
|
||||||
uri={uri}
|
uri={uri}
|
||||||
showHiddenByUser={showHiddenByUser}
|
showHiddenByUser={showHiddenByUser}
|
||||||
|
showUnresolvedClaims={showUnresolvedClaims}
|
||||||
properties={renderProperties}
|
properties={renderProperties}
|
||||||
collectionId={collectionId}
|
collectionId={collectionId}
|
||||||
fypId={fypId}
|
fypId={fypId}
|
||||||
|
|
|
@ -45,10 +45,11 @@ type Props = {
|
||||||
isMature: boolean,
|
isMature: boolean,
|
||||||
showMature: boolean,
|
showMature: boolean,
|
||||||
showHiddenByUser?: boolean,
|
showHiddenByUser?: boolean,
|
||||||
|
showNoSourceClaims?: boolean,
|
||||||
|
showUnresolvedClaims?: boolean,
|
||||||
properties?: (Claim) => void,
|
properties?: (Claim) => void,
|
||||||
collectionId?: string,
|
collectionId?: string,
|
||||||
fypId?: string,
|
fypId?: string,
|
||||||
showNoSourceClaims?: boolean,
|
|
||||||
isLivestream: boolean,
|
isLivestream: boolean,
|
||||||
viewCount: string,
|
viewCount: string,
|
||||||
isLivestreamActive: boolean,
|
isLivestreamActive: boolean,
|
||||||
|
@ -76,6 +77,7 @@ function ClaimPreviewTile(props: Props) {
|
||||||
showHiddenByUser,
|
showHiddenByUser,
|
||||||
properties,
|
properties,
|
||||||
showNoSourceClaims,
|
showNoSourceClaims,
|
||||||
|
showUnresolvedClaims,
|
||||||
isLivestream,
|
isLivestream,
|
||||||
isLivestreamActive,
|
isLivestreamActive,
|
||||||
livestreamViewerCount,
|
livestreamViewerCount,
|
||||||
|
@ -88,6 +90,7 @@ function ClaimPreviewTile(props: Props) {
|
||||||
const isRepost = claim && claim.repost_channel_url;
|
const isRepost = claim && claim.repost_channel_url;
|
||||||
const isCollection = claim && claim.value_type === 'collection';
|
const isCollection = claim && claim.value_type === 'collection';
|
||||||
const isStream = claim && claim.value_type === 'stream';
|
const isStream = claim && claim.value_type === 'stream';
|
||||||
|
const isAbandoned = !isResolvingUri && !claim;
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const isPlayable =
|
const isPlayable =
|
||||||
claim &&
|
claim &&
|
||||||
|
@ -150,7 +153,10 @@ function ClaimPreviewTile(props: Props) {
|
||||||
shouldHide = true;
|
shouldHide = true;
|
||||||
} else {
|
} else {
|
||||||
shouldHide =
|
shouldHide =
|
||||||
banState.blacklisted || banState.filtered || (!showHiddenByUser && (banState.muted || banState.blocked));
|
banState.blacklisted ||
|
||||||
|
banState.filtered ||
|
||||||
|
(!showHiddenByUser && (banState.muted || banState.blocked)) ||
|
||||||
|
(isAbandoned && !showUnresolvedClaims);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldHide || (isLivestream && !showNoSourceClaims)) {
|
if (shouldHide || (isLivestream && !showNoSourceClaims)) {
|
||||||
|
|
|
@ -129,6 +129,7 @@ export default function CollectionsListMine(props: Props) {
|
||||||
key={list.name}
|
key={list.name}
|
||||||
uris={itemUrls.slice(0, 6)}
|
uris={itemUrls.slice(0, 6)}
|
||||||
collectionId={list.id}
|
collectionId={list.id}
|
||||||
|
showUnresolvedClaims
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue