Do not show shuffle option for empty collections.
This commit is contained in:
parent
63ce691b90
commit
6108860063
1 changed files with 19 additions and 12 deletions
|
@ -110,6 +110,11 @@ function ClaimMenuList(props: Props) {
|
|||
const [doShuffle, setDoShuffle] = React.useState(false);
|
||||
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
||||
const isChannel = !incognitoClaim && !contentSigningChannel;
|
||||
// $FlowFixMe
|
||||
const claimLength = claim && claim.value && claim.value.claims && claim.value.claims.length;
|
||||
// $FlowFixMe
|
||||
const claimCount = editedCollection ? editedCollection.items.length : claimLength;
|
||||
const isEmptyCollection = (Number(claimCount) || 0) <= 0;
|
||||
const { channelName } = parseURI(contentChannelUri);
|
||||
const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0));
|
||||
const subscriptionLabel = repostedClaim
|
||||
|
@ -297,6 +302,7 @@ function ClaimMenuList(props: Props) {
|
|||
{__('View List')}
|
||||
</a>
|
||||
</MenuItem>
|
||||
{!isEmptyCollection && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => {
|
||||
|
@ -309,6 +315,7 @@ function ClaimMenuList(props: Props) {
|
|||
{__('Shuffle Play')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
{isMyCollection && (
|
||||
<>
|
||||
<MenuItem
|
||||
|
|
Loading…
Reference in a new issue