Reset app state without closing/restarting it

This commit is contained in:
Sofiya Tepikin
2022-08-10 15:40:48 +02:00
parent 0ec23219bf
commit 08b0dc7734
8 changed files with 51 additions and 21 deletions
+1 -2
View File
@@ -195,7 +195,7 @@ export function requestHash(type, pw) {
)
}
export async function changeEncryptionAndRestartApp(hash) {
export async function changeDbEncryption(hash) {
let key
if (hash) key = hashToInt8Array(hash)
const defaultPath = db.path
@@ -209,7 +209,6 @@ export async function changeEncryptionAndRestartApp(hash) {
db.close()
await fs.unlink(defaultPath)
await fs.moveFile(copyPath, defaultPath)
restartApp()
}
export function isDbEmpty() {