Skip to content

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

mobile: delete vault action keeps loading when entering incorrect password

Ammar Ahmed9963a6c65546
diff --git a/apps/mobile/app/components/dialogs/vault/index.tsx b/apps/mobile/app/components/dialogs/vault/index.tsx
index 0cfdf7661..c95885e99 100644
--- a/apps/mobile/app/components/dialogs/vault/index.tsx
+++ b/apps/mobile/app/components/dialogs/vault/index.tsx
@@ -194,6 +194,7 @@ export const VaultDialog: React.FC = () => {
close();
}, 100);
} else {
+ setLoading(false);
ToastManager.show({
heading: strings.passwordIncorrect(),
type: "error",
@@ -227,6 +228,10 @@ export const VaultDialog: React.FC = () => {
setLoading(false);
close();
eSendEvent("vaultUpdated");
+ ToastManager.show({
+ message: strings.vaultCleared(),
+ type: "success"
+ });
} catch (e) {
ToastManager.show({
heading: strings.passwordIncorrect(),
@@ -741,7 +746,8 @@ export const VaultDialog: React.FC = () => {
width: DDS.isTab ? 350 : "85%",
borderRadius: 10,
backgroundColor: colors.primary.background,
- paddingTop: 12
+ paddingTop: 12,
+ overflow: "hidden"
}}
>
<DialogHeader
@@ -808,7 +814,8 @@ export const VaultDialog: React.FC = () => {
!isBiometryAvailable ||
isCreateVault ||
isChangePassword ||
- isCustomAction ? null : (
+ isCustomAction ||
+ isDeleteVault ? null : (
<Button
onPress={() =>
onPressFingerprintAuth(strings.unlockNote(), "")