Skip to content

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

check if user is logged in before restoring backup

ammarahm-ed214c0b3a6585
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index b3cd761a2..9da7c398e 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -1778,6 +1778,15 @@ export const SettingsBackupAndRestore = ({isSheet}) => {
{
name: 'Restore backup',
func: async () => {
+ if (!user || !user?.email) {
+ ToastEvent.show({
+ heading:"Login required",
+ message:"Please login to your account to restore backup",
+ type:"error",
+ context:'global'
+ })
+ return;
+ }
if (isSheet) {
eSendEvent(eCloseProgressDialog);
await sleep(300);