Rename onunload

This commit is contained in:
Andras Schmelczer 2025-02-22 15:18:30 +00:00
parent 39561d386e
commit e6eedab87d
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 3 additions and 2 deletions

View file

@ -92,7 +92,7 @@ export default class VaultLinkPlugin extends Plugin {
} }
public onunload(): void { public onunload(): void {
this.client.onunload(); this.client.stop();
} }
public openSettings(): void { public openSettings(): void {

View file

@ -138,7 +138,7 @@ export class SyncClient {
this.logger.reset(); this.logger.reset();
} }
public onunload(): void { public stop(): void {
if (this.remoteListenerIntervalId !== null) { if (this.remoteListenerIntervalId !== null) {
clearInterval(this.remoteListenerIntervalId); clearInterval(this.remoteListenerIntervalId);
} }

View file

@ -91,6 +91,7 @@ export class MockAgent extends MockClient {
await Promise.all(this.pendingActions); await Promise.all(this.pendingActions);
await this.client.settings.setSetting("isSyncEnabled", true); await this.client.settings.setSetting("isSyncEnabled", true);
await this.client.syncer.applyRemoteChangesLocally(); await this.client.syncer.applyRemoteChangesLocally();
this.client.stop();
} }
public assertFileSystemIsConsistent(): void { public assertFileSystemIsConsistent(): void {