From 7beda491e9ac7756eccc81f1feedc89583842a66 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sun, 30 Nov 2025 14:43:22 +0000 Subject: [PATCH] Rename method --- frontend/sync-client/src/sync-client.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/sync-client/src/sync-client.ts b/frontend/sync-client/src/sync-client.ts index 0ca98137..b76da9d9 100644 --- a/frontend/sync-client/src/sync-client.ts +++ b/frontend/sync-client/src/sync-client.ts @@ -286,8 +286,8 @@ export class SyncClient { * and the local database but retain the settings. * The SyncClient can be used again after calling this method. */ - public async applyChangedConnectionSettings(): Promise { - this.checkIfDestroyed("applyChangedConnectionSettings"); + public async reset(): Promise { + this.checkIfDestroyed("reset"); this.logger.info( "Stopping SyncClient to apply changed connection settings" @@ -451,6 +451,7 @@ export class SyncClient { this.fetchController.finishReset(); await this.serverConfig.initialize(); + this.webSocketManager.start(); if (!this.hasStartedOfflineSync) { this.hasStartedOfflineSync = true; @@ -458,7 +459,6 @@ export class SyncClient { } this.hasFinishedOfflineSync = true; - this.webSocketManager.start(); } private async pause(): Promise { @@ -470,7 +470,7 @@ export class SyncClient { private resetInMemoryState(): void { this.history.reset(); this.contentCache.reset(); - this.logger.reset(); + // don't reset the logger this.cursorTracker.reset(); this.syncer.reset(); this.fileOperations.reset(); @@ -486,7 +486,7 @@ export class SyncClient { newSettings.vaultName !== oldSettings.vaultName || newSettings.remoteUri !== oldSettings.remoteUri ) { - await this.applyChangedConnectionSettings(); + await this.reset(); } if (newSettings.isSyncEnabled !== oldSettings.isSyncEnabled) {