π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix cast build errors
Neeraj Gupta17caa99416ac
diff --git a/apps/cast/src/services/castDownloadManager.ts b/apps/cast/src/services/castDownloadManager.tsindex c951a1301d..dbf7a43945 100644--- a/apps/cast/src/services/castDownloadManager.ts+++ b/apps/cast/src/services/castDownloadManager.ts@@ -143,20 +143,11 @@ class CastDownloadManager {return decrypted;};- getFile = async (- file: EnteFile,- token: string,- passwordToken: string,- forPreview = false- ) => {+ getFile = async (file: EnteFile, castToken: string, forPreview = false) => {const fileKey = forPreview ? `${file.id}_preview` : `${file.id}`;try {const getFilePromise = async () => {- const fileStream = await this.downloadFile(- token,- passwordToken,- file- );+ const fileStream = await this.downloadFile(castToken, file);const fileBlob = await new Response(fileStream).blob();if (forPreview) {return await getRenderableFileURL(file, fileBlob);diff --git a/apps/cast/src/types/gallery/index.ts b/apps/cast/src/types/gallery/index.tsindex 01b3a7af1c..927340b967 100644--- a/apps/cast/src/types/gallery/index.ts+++ b/apps/cast/src/types/gallery/index.ts@@ -1,9 +1,9 @@// import { CollectionDownloadProgressAttributes } from 'components/Collections/CollectionDownloadProgress';// import { CollectionSelectorAttributes } from 'components/Collections/CollectionSelector';// import { TimeStampListItem } from 'components/PhotoList';+import { User } from '@ente/shared/user/types';import { Collection } from 'types/collection';import { EnteFile } from 'types/file';-import { User } from 'types/user';export type SelectedState = {[k: number]: boolean;diff --git a/apps/cast/src/types/upload/index.ts b/apps/cast/src/types/upload/index.tsindex 6c420c77b6..192315ef1f 100644--- a/apps/cast/src/types/upload/index.ts+++ b/apps/cast/src/types/upload/index.ts@@ -1,6 +1,9 @@+import {+ B64EncryptionResult,+ LocalFileAttributes,+} from '@ente/shared/crypto/types';import { FILE_TYPE } from 'constants/file';import { Collection } from 'types/collection';-import { B64EncryptionResult, LocalFileAttributes } from 'types/crypto';import {MetadataFileAttributes,S3FileAttributes,diff --git a/apps/cast/src/utils/collection/index.ts b/apps/cast/src/utils/collection/index.tsindex 092f7dfae7..54396ab8e2 100644--- a/apps/cast/src/utils/collection/index.ts+++ b/apps/cast/src/utils/collection/index.ts@@ -1,14 +1,4 @@-import {- getNonEmptyCollections,- updatePublicCollectionMagicMetadata,-} from 'services/collectionService';-import { EnteFile } from 'types/file';-import { logError } from '@ente/shared/sentry';-import {- COLLECTION_ROLE,- Collection,- CollectionPublicMagicMetadataProps,-} from 'types/collection';+import { COLLECTION_ROLE, Collection } from 'types/collection';import {CollectionSummaryType,CollectionType,@@ -16,7 +6,6 @@ import {OPTIONS_NOT_HAVING_COLLECTION_TYPES,} from 'constants/collection';import { SUB_TYPE, VISIBILITY_STATE } from 'types/magicMetadata';-import { updateMagicMetadata } from 'utils/magicMetadata';import { User } from '@ente/shared/user/types';import { getData, LS_KEYS } from '@ente/shared/storage/localStorage';@@ -35,31 +24,6 @@ export function getSelectedCollection(return collections.find((collection) => collection.id === collectionID);}-export const changeCollectionSortOrder = async (- collection: Collection,- asc: boolean-) => {- try {- const updatedPublicMagicMetadataProps: CollectionPublicMagicMetadataProps =- {- asc,- };-- const updatedPubMagicMetadata = await updateMagicMetadata(- updatedPublicMagicMetadataProps,- collection.pubMagicMetadata,- collection.key- );-- await updatePublicCollectionMagicMetadata(- collection,- updatedPubMagicMetadata- );- } catch (e) {- logError(e, 'change collection sort order failed');- }-};-export const shouldShowOptions = (type: CollectionSummaryType) => {return !OPTIONS_NOT_HAVING_COLLECTION_TYPES.has(type);};@@ -172,24 +136,6 @@ export function getCollectionNameMap();}-export function getNonEmptyPersonalCollections(- collections: Collection[],- personalFiles: EnteFile[],- user: User-): Collection[] {- if (!user?.id) {- throw Error('user missing');- }- const nonEmptyCollections = getNonEmptyCollections(- collections,- personalFiles- );- const personalCollections = nonEmptyCollections.filter(- (collection) => collection.owner.id === user?.id- );- return personalCollections;-}-export function getNonHiddenCollections(collections: Collection[]): Collection[] {