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

Desktop: Add new setting to show note counts for folders and tags (#2006)

* Adding node counts for folders and tags

* Add unit tests

* Fix count update when the tag list for a note is updated

* Right align note counts and remove from the settings screen

* Folder note count calculation update to include descendants

* Update Setting.js

* Change count style and fix click on counts

* Fix tag/folder count update on delete/add note

* Review updates
This commit is contained in:
Diego Erdody
2019-11-10 22:14:56 -08:00
committed by Laurent Cozic
parent c0dd8d0332
commit 9c98fb5312
11 changed files with 139 additions and 14 deletions

View File

@ -440,7 +440,7 @@ class BaseApplication {
await this.refreshNotes(newState, refreshNotesUseSelectedNoteId, refreshNotesHash);
}
if (action.type === 'NOTE_UPDATE_ONE') {
if (action.type === 'NOTE_UPDATE_ONE' || action.type === 'NOTE_DELETE') {
refreshFolders = true;
}
@ -448,6 +448,10 @@ class BaseApplication {
refreshFolders = 'now';
}
if (this.hasGui() && ((action.type == 'SETTING_UPDATE_ONE' && action.key == 'showNoteCounts') || action.type == 'SETTING_UPDATE_ALL')) {
refreshFolders = 'now';
}
if (this.hasGui() && action.type === 'SYNC_GOT_ENCRYPTED_ITEM') {
DecryptionWorker.instance().scheduleStart();
}