Reset app state without closing/restarting it

This commit is contained in:
Sofiya Tepikin
2022-08-10 15:40:48 +02:00
parent d9a1cd7895
commit 38f91c2e25
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() {