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

All: Improves deletion fail-safe so it is based on percentage of notes deleted. And display warning on sidebar.

This commit is contained in:
Laurent Cozic
2019-09-27 18:12:28 +00:00
parent 1836b9a0b0
commit c9098b0489
6 changed files with 60 additions and 37 deletions

View File

@ -715,7 +715,11 @@ class Synchronizer {
// Or it's a temporary issue that will be resolved on next sync.
this.logger().info(error.message);
if (error.code === 'failSafe') this.logLastRequests();
if (error.code === 'failSafe') {
// Get the message to display on UI, but not in testing to avoid poluting stdout
if (!shim.isTestingEnv()) this.progressReport_.errors.push(error.message);
this.logLastRequests();
}
} else if (error.code === 'unknownItemType') {
this.progressReport_.errors.push(_('Unknown item type downloaded - please upgrade Joplin to the latest version'));
this.logger().error(error);