1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop, Mobile: Fixes #9157: Clear "Some items cannot be synchronised" banner after situation is resolved

This commit is contained in:
Laurent Cozic
2024-01-27 16:59:19 +00:00
parent e4854b0bc2
commit 149e409bfa
9 changed files with 50 additions and 10 deletions

View File

@ -791,6 +791,11 @@ export default class BaseItem extends BaseModel {
return output;
}
public static async syncDisabledItemsCount(syncTargetId: number) {
const r = await this.db().selectOne('SELECT count(*) as total FROM sync_items WHERE sync_disabled = 1 AND sync_target = ?', [syncTargetId]);
return r ? r.total : 0;
}
public static updateSyncTimeQueries(syncTarget: number, item: any, syncTime: number, syncDisabled = false, syncDisabledReason = '', itemLocation: number = null) {
const itemType = item.type_;
const itemId = item.id;