Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove unused knob

Manav Rathib5096b02dae0
diff --git a/web/apps/photos/src/services/download/clients/photos.ts b/web/apps/photos/src/services/download/clients/photos.ts
index a605aa64d9..6a4d9cddba 100644
--- a/web/apps/photos/src/services/download/clients/photos.ts
+++ b/web/apps/photos/src/services/download/clients/photos.ts
@@ -10,14 +10,11 @@ export class PhotosDownloadClient implements DownloadClient {
private token: string,
private timeout: number,
) {}
+
updateTokens(token: string) {
this.token = token;
}
- updateTimeout(timeout: number) {
- this.timeout = timeout;
- }
-
async downloadThumbnail(file: EnteFile): Promise<Uint8Array> {
if (!this.token) {
throw Error(CustomError.TOKEN_MISSING);
diff --git a/web/apps/photos/src/services/download/clients/publicAlbums.ts b/web/apps/photos/src/services/download/clients/publicAlbums.ts
index be4fe34c47..48cb2292a4 100644
--- a/web/apps/photos/src/services/download/clients/publicAlbums.ts
+++ b/web/apps/photos/src/services/download/clients/publicAlbums.ts
@@ -20,10 +20,6 @@ export class PublicAlbumsDownloadClient implements DownloadClient {
this.passwordToken = passwordToken;
}
- updateTimeout(timeout: number) {
- this.timeout = timeout;
- }
-
downloadThumbnail = async (file: EnteFile) => {
if (!this.token) {
throw Error(CustomError.TOKEN_MISSING);
diff --git a/web/apps/photos/src/services/download/index.ts b/web/apps/photos/src/services/download/index.ts
index 301788739a..80e6fe8f18 100644
--- a/web/apps/photos/src/services/download/index.ts
+++ b/web/apps/photos/src/services/download/index.ts
@@ -40,7 +40,6 @@ export type OnDownloadProgress = (event: {
export interface DownloadClient {
updateTokens: (token: string, passwordToken?: string) => void;
- updateTimeout: (timeout: number) => void;
downloadThumbnail: (
file: EnteFile,
timeout?: number,
@@ -77,13 +76,12 @@ class DownloadManagerImpl {
async init(
app: APPS,
tokens?: { token: string; passwordToken?: string } | { token: string },
- timeout?: number,
) {
if (this.ready) {
log.info("DownloadManager already initialized");
return;
}
- this.downloadClient = createDownloadClient(app, tokens, timeout);
+ this.downloadClient = createDownloadClient(app, tokens);
try {
this.thumbnailCache = await openCache("thumbs");
} catch (e) {
@@ -127,10 +125,6 @@ class DownloadManagerImpl {
this.cryptoWorker = cryptoWorker;
}
- updateTimeout(timeout: number) {
- this.downloadClient.updateTimeout(timeout);
- }
-
setProgressUpdater(progressUpdater: (value: Map<number, number>) => void) {
this.progressUpdater = progressUpdater;
}
@@ -525,11 +519,8 @@ export default DownloadManager;
function createDownloadClient(
app: APPS,
tokens?: { token: string; passwordToken?: string } | { token: string },
- timeout?: number,
): DownloadClient {
- if (!timeout) {
- timeout = 300000; // 5 minute
- }
+ const timeout = 300000; // 5 minute
if (app === APPS.ALBUMS) {
if (!tokens) {
tokens = { token: undefined, passwordToken: undefined };