1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Long list format

This commit is contained in:
Laurent Cozic
2017-07-12 21:39:47 +01:00
parent b596747612
commit 74e112fef9
7 changed files with 122 additions and 12 deletions

View File

@ -43,6 +43,11 @@ class Folder extends BaseItem {
});
}
static async noteCount(parentId) {
let r = await this.db().selectOne('SELECT count(*) as total FROM notes WHERE is_conflict = 0 AND parent_id = ?', [parentId]);
return r ? r.total : 0;
}
static async delete(folderId, options = null) {
let folder = await Folder.load(folderId);
if (!folder) throw new Error('Trying to delete non-existing notebook: ' + folderId);