clarify incognito claim

This commit is contained in:
zeppi 2021-06-15 16:36:35 -04:00 committed by jessopb
parent ce6ae9402b
commit 7457eebd88

View file

@ -84,10 +84,10 @@ function ClaimMenuList(props: Props) {
} = props; } = props;
const repostedContent = claim && claim.reposted_claim; const repostedContent = claim && claim.reposted_claim;
const contentClaim = repostedContent || claim; const contentClaim = repostedContent || claim;
const incognito = channelUri && !channelUri.includes('@'); const incognitoClaim = channelUri && !channelUri.includes('@');
const signingChannel = claim && (claim.signing_channel || claim); const signingChannel = claim && (claim.signing_channel || claim);
const permanentUrl = String(channelUri); const permanentUrl = String(channelUri);
const isChannel = !incognito && signingChannel === claim; const isChannel = !incognitoClaim && signingChannel === claim;
const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0)); const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0));
const subscriptionLabel = isSubscribed ? __('Unfollow') : __('Follow'); const subscriptionLabel = isSubscribed ? __('Unfollow') : __('Follow');
@ -189,15 +189,6 @@ function ClaimMenuList(props: Props) {
<Icon size={20} icon={ICONS.MORE_VERTICAL} /> <Icon size={20} icon={ICONS.MORE_VERTICAL} />
</MenuButton> </MenuButton>
<MenuList className="menu__list"> <MenuList className="menu__list">
{!incognito && !isRepost && !claimIsMine && !isChannelPage && (
<MenuItem className="comment__menu-option" onSelect={handleFollow}>
<div className="menu__link">
<Icon aria-hidden icon={ICONS.SUBSCRIBE} />
{subscriptionLabel}
</div>
</MenuItem>
)}
{hasExperimentalUi && ( {hasExperimentalUi && (
<> <>
{/* WATCH LATER */} {/* WATCH LATER */}
@ -270,7 +261,14 @@ function ClaimMenuList(props: Props) {
)} )}
</> </>
)} )}
{!incognitoClaim && !isRepost && !claimIsMine && !isChannelPage && (
<MenuItem className="comment__menu-option" onSelect={handleFollow}>
<div className="menu__link">
<Icon aria-hidden icon={ICONS.SUBSCRIBE} />
{subscriptionLabel}
</div>
</MenuItem>
)}
{!isChannelPage && ( {!isChannelPage && (
<> <>
<MenuItem className="comment__menu-option" onSelect={handleSupport}> <MenuItem className="comment__menu-option" onSelect={handleSupport}>
@ -286,7 +284,7 @@ function ClaimMenuList(props: Props) {
{!isMyCollection && ( {!isMyCollection && (
<> <>
{(!claimIsMine || channelIsBlocked) && channelUri ? ( {(!claimIsMine || channelIsBlocked) && channelUri ? (
!incognito && !incognitoClaim &&
!isRepost && ( !isRepost && (
<> <>
<MenuItem className="comment__menu-option" onSelect={handleToggleBlock}> <MenuItem className="comment__menu-option" onSelect={handleToggleBlock}>