Take user password and try to open db

This commit is contained in:
Julia Friesel committed 2018-09-16 11:47:05 +02:00
1 parent 3d61459f30
commit 34648a3d89
8 files changed
+53 -57

No files matched your search

+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