Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

cleanup

ammarahm-ed0f6ba58e6f76
diff --git a/apps/mobile/src/components/VaultDialog/index.js b/apps/mobile/src/components/VaultDialog/index.js
index ae26b489f..20e8c576c 100644
--- a/apps/mobile/src/components/VaultDialog/index.js
+++ b/apps/mobile/src/components/VaultDialog/index.js
@@ -50,17 +50,12 @@ export class VaultDialog extends Component {
let n = db.notes.note(this.props.note.id).data;
let item;
- if (n.content.cipher) {
- try {
- item = await db.notes
- .note(n.id)
- .unlock(this.password, this.props.perm);
- } catch (error) {
- ToastEvent.show('Password incorrect, unable to unlock note');
- return;
- }
- } else {
- item = n;
+
+ try {
+ item = await db.notes.note(n.id).unlock(this.password, this.props.perm);
+ } catch (error) {
+ ToastEvent.show('Password incorrect, unable to unlock note');
+ return;
}
if (!this.props.perm) {
@@ -69,7 +64,6 @@ export class VaultDialog extends Component {
openEditorAnimation();
}
}
-
this.close(this.props.shareAfterUnlock, item);
} else {
await db.notes.note(this.props.note.id).lock('password');