1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Better handling of network errors

This commit is contained in:
Laurent Cozic
2017-07-30 22:22:57 +02:00
parent ad1fbba78d
commit 242b6dbff8
6 changed files with 34 additions and 23 deletions

View File

@ -55,7 +55,7 @@ class Synchronizer {
if (report.updateRemote) lines.push(_('Updated remote items: %d.', report.updateRemote));
if (report.deleteLocal) lines.push(_('Deleted local items: %d.', report.deleteLocal));
if (report.deleteRemote) lines.push(_('Deleted remote items: %d.', report.deleteRemote));
if (report.state) lines.push(_('State: %s.', report.state.replace(/_/g, ' ')));
if (!report.completedTime && report.state) lines.push(_('State: %s.', report.state.replace(/_/g, ' ')));
if (report.errors && report.errors.length) lines.push(_('Last error: %s (stacktrace in log).', report.errors[report.errors.length-1].message));
if (report.cancelling && !report.completedTime) lines.push(_('Cancelling...'));
if (report.completedTime) lines.push(_('Completed: %s', time.unixMsToLocalDateTime(report.completedTime)));
@ -464,7 +464,6 @@ class Synchronizer {
this.cancelling_ = false;
}
this.progressReport_.completedTime = time.unixMs();
this.logSyncOperation('finished', null, null, 'Synchronisation finished [' + synchronizationId + ']');
@ -475,7 +474,7 @@ class Synchronizer {
this.progressReport_ = {};
this.dispatch({ type: 'SYNC_COMPLETED' });
this.state_ = 'idle';
return outputContext;