Skip to content

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

fix login flow

ammarahm-eded913a53c048
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 30c54fcfb..a63c8549c 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -189,17 +189,17 @@ export class DialogManager extends Component {
};
showAddNotebook = data => {
- this.setState(
+ /* this.setState(
{
item: data.item ? data.item : {},
},
() => {
this.addNotebooksDialog.open();
},
- );
+ ); */
};
hideAddNotebook = () => {
- this.addNotebooksDialog.close();
+ //this.addNotebooksDialog.close();
};
_showSimpleDialog = data => {
diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.js
index e0f38672e..d6c8107d1 100644
--- a/apps/mobile/src/components/LoginDialog/index.js
+++ b/apps/mobile/src/components/LoginDialog/index.js
@@ -1,30 +1,29 @@
import CheckBox from '@react-native-community/checkbox';
-import React, {createRef, useEffect, useState} from 'react';
-import {Clipboard, Modal, Text, TouchableOpacity, View} from 'react-native';
-import * as Animatable from 'react-native-animatable';
-import {TextInput} from 'react-native-gesture-handler';
+import React, { createRef, useEffect, useState } from 'react';
+import { Clipboard, Modal, Text, TouchableOpacity, View } from 'react-native';
+import { TextInput } from 'react-native-gesture-handler';
import QRCode from 'react-native-qrcode-generator';
-import {useSafeAreaInsets} from 'react-native-safe-area-context';
+import { useSafeAreaInsets } from 'react-native-safe-area-context';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
-import {Button} from '../../components/Button';
+import { opacity, ph, pv, SIZE, WEIGHT } from '../../common/common';
+import { Button } from '../../components/Button';
import Seperator from '../../components/Seperator';
-import {Toast} from '../../components/Toast';
-import {ACTIONS} from '../../provider/actions';
-import {useTracked} from '../../provider/index';
+import { Toast } from '../../components/Toast';
+import { ACTIONS } from '../../provider/actions';
+import { useTracked } from '../../provider/index';
import {
eSendEvent,
eSubscribeEvent,
- eUnSubscribeEvent,
+ eUnSubscribeEvent
} from '../../services/eventManager';
-import {eCloseLoginDialog, eOpenLoginDialog} from '../../services/events';
+import { eCloseLoginDialog, eOpenLoginDialog } from '../../services/events';
import {
validateEmail,
validatePass,
- validateUsername,
+ validateUsername
} from '../../services/validation';
-import {db, DDS, getElevation, ToastEvent} from '../../utils/utils';
-import {Loading} from '../Loading';
+import { db, DDS, getElevation, ToastEvent } from '../../utils/utils';
+import { Loading } from '../Loading';
const LoginDialog = () => {
const [state, dispatch] = useTracked();
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index d9ecf4914..5fba23ce1 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -417,11 +417,7 @@ export const Settings = ({route, navigation}) => {
alpha={!colors.night ? -0.02 : 0.1}
opacity={0.12}
onPress={() => {
- DDS.isTab
- ? eSendEvent(eOpenLoginDialog)
- : NavigationService.navigate('Login', {
- root: true,
- });
+ eSendEvent(eOpenLoginDialog);
}}
activeOpacity={opacity / 2}
customStyle={{
@@ -439,6 +435,7 @@ export const Settings = ({route, navigation}) => {
width: 40,
backgroundColor: colors.accent,
height: 40,
+ marginLeft:10,
borderRadius: 100,
alignItems: 'center',
justifyContent: 'center',