diff --git a/web/apps/photos/src/components/PhotoList/index.tsx b/web/apps/photos/src/components/PhotoList/index.tsx index 27dfcda6d9..a6dfaa3a5a 100644 --- a/web/apps/photos/src/components/PhotoList/index.tsx +++ b/web/apps/photos/src/components/PhotoList/index.tsx @@ -631,10 +631,6 @@ export function PhotoList({ /** * Checks and merge multiple dates into a single row. - * - * @param items - * @param columns - * @returns */ const mergeTimeStampList = ( items: TimeStampListItem[], diff --git a/web/packages/new/photos/services/download.ts b/web/packages/new/photos/services/download.ts index e92fb10282..406411f1d6 100644 --- a/web/packages/new/photos/services/download.ts +++ b/web/packages/new/photos/services/download.ts @@ -178,8 +178,8 @@ class DownloadManagerImpl { this.ensureInitialized(); if (!this.thumbnailURLPromises.has(file.id)) { - const url = this.thumbnailBytes(file, cachedOnly).then((bytes) => - bytes ? URL.createObjectURL(new Blob([bytes])) : undefined, + const url = this.thumbnailData(file, cachedOnly).then((data) => + data ? URL.createObjectURL(new Blob([data])) : undefined, ); this.thumbnailURLPromises.set(file.id, url); } @@ -204,11 +204,11 @@ class DownloadManagerImpl { * @param cachedOnly If true, then the thumbnail is not downloaded if it is * not already present in the disk cache. * - * @returns The bytes of the thumbnail. This method can return `undefined` - * iff the thumbnail is not already cached, and {@link cachedOnly} is set to - * `true`. + * @returns The bytes of the thumbnail, as a {@link Uint8Array}. This method + * can return `undefined` iff the thumbnail is not already cached, and + * {@link cachedOnly} is set to `true`. */ - async thumbnailBytes(file: EnteFile, cachedOnly = false) { + async thumbnailData(file: EnteFile, cachedOnly = false) { this.ensureInitialized(); const key = file.id.toString(); @@ -287,8 +287,6 @@ class DownloadManagerImpl { * cached for subsequent use. * * @param file The {@link EnteFile} whose data we want. - * - * @returns */ async fileStream( file: EnteFile, diff --git a/web/packages/new/photos/services/ml/blob.ts b/web/packages/new/photos/services/ml/blob.ts index aa7221982d..2bf7b024ab 100644 --- a/web/packages/new/photos/services/ml/blob.ts +++ b/web/packages/new/photos/services/ml/blob.ts @@ -91,8 +91,8 @@ const fetchRenderableUploadItemBlob = async ( ) => { const fileType = file.metadata.fileType; if (fileType == FileType.video) { - const data = await DownloadManager.thumbnailBytes(file); - return new Blob([data!]); + const thumbnailData = await DownloadManager.thumbnailData(file); + return new Blob([thumbnailData!]); } else { const blob = await readNonVideoUploadItem(uploadItem, electron); return renderableImageBlob(file.metadata.title, blob); @@ -146,7 +146,7 @@ export const fetchRenderableEnteFileBlob = async ( ): Promise => { const fileType = file.metadata.fileType; if (fileType == FileType.video) { - const thumbnailData = await DownloadManager.thumbnailBytes(file); + const thumbnailData = await DownloadManager.thumbnailData(file); return new Blob([thumbnailData!]); }