Stop exposing Syncer from SyncClient

This commit is contained in:
Andras Schmelczer 2025-03-22 13:48:01 +00:00
parent 93b43f57b7
commit 2722f7c7fc
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
11 changed files with 84 additions and 55 deletions

View file

@ -17,7 +17,7 @@ export class ConnectionStatus {
[this.until, this.resolveUntil, this.rejectUntil] =
createPromise<symbol>();
settings.addOnSettingsChangeHandlers((newSettings, oldSettings) => {
settings.addOnSettingsChangeListener((newSettings, oldSettings) => {
if (oldSettings.isSyncEnabled != newSettings.isSyncEnabled) {
this.canFetch = newSettings.isSyncEnabled;
this.resolveUntil(ConnectionStatus.UNTIL_RESOLUTION);

View file

@ -27,7 +27,7 @@ export class SyncService {
) {
this.createClient(this.settings.getSettings().remoteUri);
settings.addOnSettingsChangeHandlers((newSettings, oldSettings) => {
settings.addOnSettingsChangeListener((newSettings, oldSettings) => {
if (newSettings.remoteUri === oldSettings.remoteUri) {
return;
}