From 1b7ab8b0384eeb595412b9e8c810e0942c56231e Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Thu, 20 Mar 2025 21:19:59 +0000 Subject: [PATCH] Fix reset logic --- frontend/sync-client/src/sync-operations/syncer.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/sync-client/src/sync-operations/syncer.ts b/frontend/sync-client/src/sync-operations/syncer.ts index 70ba88d5..7ea50e93 100644 --- a/frontend/sync-client/src/sync-operations/syncer.ts +++ b/frontend/sync-client/src/sync-operations/syncer.ts @@ -10,7 +10,6 @@ import type { Settings } from "../persistence/settings"; import type { FileOperations } from "../file-operations/file-operations"; import { findMatchingFile } from "../utils/find-matching-file"; import { UnrestrictedSyncer } from "./unrestricted-syncer"; -import { FileNotFoundError } from "../file-operations/safe-filesystem-operations"; import { createPromise } from "../utils/create-promise"; export class Syncer { @@ -212,7 +211,7 @@ export class Syncer { } public async applyRemoteChangesLocally(): Promise { - if (this.runningApplyRemoteChangesLocally != null) { + if (this.runningApplyRemoteChangesLocally !== undefined) { this.logger.debug( "Applying remote changes locally is already in progress" ); @@ -237,11 +236,7 @@ export class Syncer { } public async reset(): Promise { - this.syncQueue.clear(); await this.syncQueue.onEmpty(); - this.remainingOperationsListeners.forEach((listener) => { - listener(0); - }); this.internalSyncer.reset(); }