You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logService.info(`GlobalState: Skipped updating${key} in storage. It is not registered to sync.`);
43
+
logService.info(`GlobalState: Skipped adding${key} in local storage as it is not registered.`);
41
44
continue;
42
45
}
43
46
if(storageKey.version!==remoteValue.version){
44
-
logService.info(`GlobalState: Skipped updating${key} in storage. Local version '${storageKey.version}' and remote version '${remoteValue.version} are not same.`);
47
+
logService.info(`GlobalState: Skipped adding${key} in local storage. Local version '${storageKey.version}' and remote version '${remoteValue.version} are not same.`);
45
48
continue;
46
49
}
47
50
constlocalValue=localStorage[key];
@@ -60,11 +63,11 @@ export function merge(localStorage: IStringDictionary<IStorageValue>, remoteStor
logService.info(`GlobalState: Skipped updating ${key} in storage. It is not registered to sync.`);
66
+
logService.info(`GlobalState: Skipped updating ${key} in local storage as is not registered.`);
64
67
continue;
65
68
}
66
69
if(storageKey.version!==remoteValue.version){
67
-
logService.info(`GlobalState: Skipped updating ${key} in storage. Local version '${storageKey.version}' and remote version '${remoteValue.version} are not same.`);
70
+
logService.info(`GlobalState: Skipped updating ${key} in local storage. Local version '${storageKey.version}' and remote version '${remoteValue.version} are not same.`);
68
71
continue;
69
72
}
70
73
constlocalValue=localStorage[key];
@@ -78,7 +81,7 @@ export function merge(localStorage: IStringDictionary<IStorageValue>, remoteStor
logService.info(`GlobalState: Skipped updating${key} in storage. It is not registered to sync.`);
84
+
logService.info(`GlobalState: Skipped removing${key} in local storage. It is not registered to sync.`);
82
85
continue;
83
86
}
84
87
local.removed.push(key);
@@ -99,6 +102,7 @@ export function merge(localStorage: IStringDictionary<IStorageValue>, remoteStor
99
102
constremoteValue=remote[key];
100
103
constlocalValue=localStorage[key];
101
104
if(localValue.version<remoteValue.version){
105
+
logService.info(`GlobalState: Skipped updating ${key} in remote storage. Local version '${localValue.version}' and remote version '${remoteValue.version} are not same.`);
102
106
continue;
103
107
}
104
108
remote[key]=localValue;
@@ -109,11 +113,21 @@ export function merge(localStorage: IStringDictionary<IStorageValue>, remoteStor
// do not remove from remote if storage key is not found
119
+
if(!storageKey){
120
+
logService.info(`GlobalState: Skipped removing ${key} in remote storage. It is not registered to sync.`);
115
121
continue;
116
122
}
123
+
124
+
constremoteValue=remote[key];
125
+
// do not remove from remote if local data version is old
126
+
if(storageKey.version<remoteValue.version){
127
+
logService.info(`GlobalState: Skipped updating ${key} in remote storage. Local version '${storageKey.version}' and remote version '${remoteValue.version} are not same.`);
0 commit comments