You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
labels
This commit is contained in:
@@ -163,11 +163,11 @@ class Synchronizer {
|
||||
if (local.syncTime) {
|
||||
action.type = 'delete';
|
||||
action.dest = 'local';
|
||||
action.reason = 'Local item has been synced to remote previously, but remote no longer exist, which means it has been deleted';
|
||||
action.reason = 'Local has been synced to remote previously, but remote no longer exist, which means remote has been deleted';
|
||||
} else {
|
||||
action.type = 'create';
|
||||
action.dest = 'remote';
|
||||
action.reason = 'Local item has never been synced to remote, and remote does not exists, which means it is new';
|
||||
action.reason = 'Local has never been synced to remote, and remote does not exists, which means remote must be created';
|
||||
}
|
||||
} else {
|
||||
if (this.itemIsStrictlyOlderThan(local, local.syncTime)) continue;
|
||||
@@ -178,7 +178,7 @@ class Synchronizer {
|
||||
action.reason = sprintf('Remote (%s) was modified after last sync of local (%s).', moment.unix(remote.updatedTime).toISOString(), moment.unix(local.syncTime).toISOString(),);
|
||||
} else if (this.itemIsStrictlyNewerThan(remote, local.syncTime)) {
|
||||
action.type = 'conflict';
|
||||
action.reason = sprintf('Both remote (%s) and local items (%s) were modified after the last sync (%s).',
|
||||
action.reason = sprintf('Both remote (%s) and local (%s) were modified after the last sync (%s).',
|
||||
moment.unix(remote.updatedTime).toISOString(),
|
||||
moment.unix(local.updatedTime).toISOString(),
|
||||
moment.unix(local.syncTime).toISOString()
|
||||
@@ -230,12 +230,12 @@ class Synchronizer {
|
||||
// modified since the last sync, it's been processed in the previous loop.
|
||||
// So throw an exception is this normally impossible condition happens anyway.
|
||||
// It's handled at condition this.itemIsStrictlyNewerThan(remote, local.syncTime) in above loop
|
||||
if (this.itemIsStrictlyNewerThan(remote, local.syncTime)) throw new Error('Remote item cannot be newer than last sync time.');
|
||||
if (this.itemIsStrictlyNewerThan(remote, local.syncTime)) throw new Error('Remote cannot be newer than last sync time.');
|
||||
|
||||
if (this.itemIsStrictlyNewerThan(remote, local.updatedTime)) {
|
||||
action.type = 'update';
|
||||
action.dest = 'local';
|
||||
action.reason = sprintf('Remote (%s) was modified after last sync of local (%s).', moment.unix(remote.updatedTime).toISOString(), moment.unix(local.syncTime).toISOString(),);;
|
||||
action.reason = sprintf('Remote (%s) was modified after local (%s).', moment.unix(remote.updatedTime).toISOString(), moment.unix(local.updatedTime).toISOString(),);;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user