Take user password and try to open db

This commit is contained in:
Julia Friesel
2018-09-12 08:51:36 +02:00
parent 3d61459f30
commit 34648a3d89
8 changed files with 53 additions and 57 deletions
+5
View File
@@ -37,6 +37,11 @@ export async function saveTempReminder(reminder) {
export const hasEncryptionObservable = Observable()
setObvWithInitValue('hasEncryption', hasEncryptionObservable, false)
export async function saveEncryptionFlag(bool) {
await AsyncStorage.setItem('hasEncryption', JSON.stringify(bool))
hasEncryptionObservable.set(bool)
}
async function setObvWithInitValue(key, obv, defaultValue) {
const result = await AsyncStorage.getItem(key)
let value