consistent checking of is_deleted, some small refactorings

This commit is contained in:
azivner
2018-01-03 22:13:02 -05:00
parent 353a9b24c1
commit 07c33979c3
7 changed files with 32 additions and 22 deletions

View File

@@ -37,9 +37,9 @@ const dbReady = new Promise((resolve, reject) => {
await executeScript(notesSql);
await executeScript(notesTreeSql);
const noteId = await getFirstValue("SELECT note_id FROM notes_tree WHERE parent_note_id = 'root' ORDER BY note_position");
const startNoteId = await getFirstValue("SELECT note_id FROM notes_tree WHERE parent_note_id = 'root' AND is_deleted = 0 ORDER BY note_position");
await require('./options').initOptions(noteId);
await require('./options').initOptions(startNoteId);
await require('./sync_table').fillAllSyncRows();
});