changed the check of collectionSummaryType for share and download quickOptions
This commit is contained in:
parent
3523f3bda9
commit
3a3647c06b
|
@ -2,7 +2,7 @@ import { CollectionActions } from '..';
|
|||
import React from 'react';
|
||||
import { CollectionSummaryType } from 'constants/collection';
|
||||
import { FlexWrapper } from 'components/Container';
|
||||
import { MoveToTrashOption } from './MoveToTrashQuickOption';
|
||||
import { MoveToTrashOption } from './EmptyTrashQuickOption';
|
||||
import { DownloadOption } from './DownloadQuickOption';
|
||||
import { ShareOption } from './ShareQuickOption';
|
||||
import {
|
||||
|
|
|
@ -199,14 +199,24 @@ export const showTrashQuickOption = (type: CollectionSummaryType) => {
|
|||
return type === CollectionSummaryType.trash;
|
||||
};
|
||||
export const showDownloadQuickOption = (type: CollectionSummaryType) => {
|
||||
return !(type === CollectionSummaryType.trash);
|
||||
return (
|
||||
type === CollectionSummaryType.folder ||
|
||||
type === CollectionSummaryType.album ||
|
||||
type === CollectionSummaryType.all ||
|
||||
type === CollectionSummaryType.incomingShare ||
|
||||
type === CollectionSummaryType.outgoingShare ||
|
||||
type === CollectionSummaryType.sharedOnlyViaLink ||
|
||||
type === CollectionSummaryType.archived
|
||||
);
|
||||
};
|
||||
export const showShareQuickOption = (type: CollectionSummaryType) => {
|
||||
return !(
|
||||
type === CollectionSummaryType.trash ||
|
||||
type === CollectionSummaryType.favorites ||
|
||||
type === CollectionSummaryType.uncategorized ||
|
||||
type === CollectionSummaryType.incomingShare
|
||||
return (
|
||||
type === CollectionSummaryType.folder ||
|
||||
type === CollectionSummaryType.album ||
|
||||
type === CollectionSummaryType.all ||
|
||||
type === CollectionSummaryType.outgoingShare ||
|
||||
type === CollectionSummaryType.sharedOnlyViaLink ||
|
||||
type === CollectionSummaryType.archived
|
||||
);
|
||||
};
|
||||
export const shouldBeShownOnCollectionBar = (type: CollectionSummaryType) => {
|
||||
|
|
Loading…
Reference in a new issue