reorder database initialization so that all critical sections are in the same transaction, #1985

This commit is contained in:
zadam
2021-05-30 22:03:41 +02:00
parent a76e3f6e2d
commit 56378cd0f5
2 changed files with 22 additions and 11 deletions

View File

@@ -27,10 +27,10 @@ function initSyncedOptions(username, password) {
passwordEncryptionService.setDataKey(password, utils.randomSecureToken(16), true);
}
function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) {
function initNotSyncedOptions(initialized, opts = {}) {
optionService.createOption('openTabs', JSON.stringify([
{
notePath: startNotePath,
notePath: 'root',
active: true
}
]), false);
@@ -98,7 +98,7 @@ function initStartupOptions() {
if (!(name in optionsMap)) {
optionService.createOption(name, value, isSynced);
log.info(`Created missing option "${name}" with default value "${value}"`);
log.info(`Created option "${name}" with default value "${value}"`);
}
}