grey out archived items in the tree

This commit is contained in:
zadam
2019-10-15 19:16:44 +02:00
parent 80a6361cf1
commit 22c4859d42
5 changed files with 67 additions and 44 deletions

View File

@@ -3,6 +3,7 @@
const sql = require('../../services/sql');
const optionService = require('../../services/options');
const protectedSessionService = require('../../services/protected_session');
const noteCacheService = require('../../services/note_cache');
async function getNotes(noteIds) {
const notes = await sql.getManyRows(`
@@ -31,7 +32,11 @@ async function getNotes(noteIds) {
protectedSessionService.decryptNotes(notes);
notes.forEach(note => note.isProtected = !!note.isProtected);
notes.forEach(note => {
note.isProtected = !!note.isProtected;
note.archived = noteCacheService.isArchived(note.noteId)
});
return notes;
}