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 React from 'react';
|
||||||
import { CollectionSummaryType } from 'constants/collection';
|
import { CollectionSummaryType } from 'constants/collection';
|
||||||
import { FlexWrapper } from 'components/Container';
|
import { FlexWrapper } from 'components/Container';
|
||||||
import { MoveToTrashOption } from './MoveToTrashQuickOption';
|
import { MoveToTrashOption } from './EmptyTrashQuickOption';
|
||||||
import { DownloadOption } from './DownloadQuickOption';
|
import { DownloadOption } from './DownloadQuickOption';
|
||||||
import { ShareOption } from './ShareQuickOption';
|
import { ShareOption } from './ShareQuickOption';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -199,14 +199,24 @@ export const showTrashQuickOption = (type: CollectionSummaryType) => {
|
||||||
return type === CollectionSummaryType.trash;
|
return type === CollectionSummaryType.trash;
|
||||||
};
|
};
|
||||||
export const showDownloadQuickOption = (type: CollectionSummaryType) => {
|
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) => {
|
export const showShareQuickOption = (type: CollectionSummaryType) => {
|
||||||
return !(
|
return (
|
||||||
type === CollectionSummaryType.trash ||
|
type === CollectionSummaryType.folder ||
|
||||||
type === CollectionSummaryType.favorites ||
|
type === CollectionSummaryType.album ||
|
||||||
type === CollectionSummaryType.uncategorized ||
|
type === CollectionSummaryType.all ||
|
||||||
type === CollectionSummaryType.incomingShare
|
type === CollectionSummaryType.outgoingShare ||
|
||||||
|
type === CollectionSummaryType.sharedOnlyViaLink ||
|
||||||
|
type === CollectionSummaryType.archived
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export const shouldBeShownOnCollectionBar = (type: CollectionSummaryType) => {
|
export const shouldBeShownOnCollectionBar = (type: CollectionSummaryType) => {
|
||||||
|
|
Loading…
Reference in a new issue