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

Mobile: Added button to clear local sync state

This commit is contained in:
Laurent Cozic
2019-06-19 14:57:59 +01:00
parent 349cade946
commit 6ce091f4d8
3 changed files with 50 additions and 3 deletions

View File

@ -694,6 +694,11 @@ class BaseItem extends BaseModel {
}
}
static async clearLocalSyncState(syncTarget) {
await this.db().exec('DELETE FROM sync_items WHERE sync_target = ?', [syncTarget]);
await this.db().exec('DELETE FROM deleted_items WHERE sync_target = ?', [syncTarget]);
}
static async forceSync(itemId) {
await this.db().exec('UPDATE sync_items SET force_sync = 1 WHERE item_id = ?', [itemId]);
}