Reset app state without closing/restarting it
This commit is contained in:
1 parent
0ec23219bf
commit
08b0dc7734
8 files changed
+51
-21
No files matched your search
+1
-2
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user