1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Made sync more reliable by making it skip items that time out, and improved sync status screen

This commit is contained in:
Laurent Cozic
2021-05-15 20:56:49 +02:00
parent 0b46880a00
commit 15fe119256
5 changed files with 107 additions and 19 deletions

View File

@ -756,6 +756,10 @@ export default class BaseItem extends BaseModel {
return this.db().transactionExecBatch(queries);
}
public static async saveSyncEnabled(itemType: ModelType, itemId: string) {
await this.db().exec('DELETE FROM sync_items WHERE item_type = ? AND item_id = ?', [itemType, itemId]);
}
// When an item is deleted, its associated sync_items data is not immediately deleted for
// performance reason. So this function is used to look for these remaining sync_items and
// delete them.