Skip to content

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

fix crash

ammarahm-ed4e9bcded7349
diff --git a/apps/mobile/App.js b/apps/mobile/App.js
index 9208579c7..43a7e0a8d 100644
--- a/apps/mobile/App.js
+++ b/apps/mobile/App.js
@@ -25,7 +25,7 @@ export const db = new Storage(StorageInterface);
let sideMenuRef;
const App = () => {
const [state, dispatch] = useTracked();
- const [colors] = state;
+ const {colors} = state;
// Local State
const [sidebar, setSidebar] = useState(w * 0.3);
const [init, setInit] = useState(false);
diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.js
index c38b42243..ccf63c9a7 100644
--- a/apps/mobile/src/components/Dialog/index.js
+++ b/apps/mobile/src/components/Dialog/index.js
@@ -1,21 +1,12 @@
-import React, {useEffect, useState, createRef, Component} from 'react';
-import {View, Text, TouchableOpacity, Modal} from 'react-native';
-import NavigationService from '../../services/NavigationService';
-import {
- COLOR_SCHEME,
- SIZE,
- br,
- ph,
- pv,
- opacity,
- FONT,
- WEIGHT,
-} from '../../common/common';
+import React, {Component} from 'react';
+import {Modal, Text, TouchableOpacity, View} from 'react-native';
import Icon from 'react-native-vector-icons/Feather';
-import {getElevation, ToastEvent} from '../../utils/utils';
-import {dialogActions, updateEvent} from '../DialogManager';
import {db} from '../../../App';
+import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
import {ACTIONS} from '../../provider';
+import NavigationService from '../../services/NavigationService';
+import {getElevation, ToastEvent} from '../../utils/utils';
+import {dialogActions, updateEvent} from '../DialogManager';
export class Dialog extends Component {
constructor(props) {
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 93a02c9a3..fd4afc093 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -4,6 +4,13 @@ import ActionSheet from '../ActionSheet';
import {ActionSheetComponent} from '../ActionSheetComponent';
import {Dialog} from '../Dialog';
import {VaultDialog} from '../VaultDialog';
+
+export const dialogActions = {
+ ACTION_DELETE: 511,
+ ACTION_EXIT: 512,
+ ACTION_EMPTY_TRASH: 513,
+};
+
export const ActionSheetEvent = (item, colors, tags, rowItems, columnItems) => {
DeviceEventEmitter.emit('ActionSheetEvent', {
item,
@@ -68,12 +75,6 @@ export const TEMPLATE_EMPTY_TRASH = {
action: dialogActions.ACTION_EMPTY_TRASH,
};
-export const dialogActions = {
- ACTION_DELETE: 511,
- ACTION_EXIT: 512,
- ACTION_EMPTY_TRASH: 513,
-};
-
export class DialogManager extends Component {
constructor(props) {
super(props);
diff --git a/apps/mobile/src/services/NavigationService.js b/apps/mobile/src/services/NavigationService.js
index 74a17bd50..34c1b56d2 100755
--- a/apps/mobile/src/services/NavigationService.js
+++ b/apps/mobile/src/services/NavigationService.js
@@ -4,23 +4,23 @@ import {
StackActions,
} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
-import Home from '../views/Home/index';
+import AccountSettings from '../views/AccountSettings';
import Editor from '../views/Editor';
-import Reminders from '../views/Reminders';
-import Lists from '../views/Lists';
-import Folders from '../views/Folders';
import Favorites from '../views/Favorites';
+import Folders from '../views/Folders';
+import ForgotPassword from '../views/ForgotPassword';
+import Home from '../views/Home/index';
+import Lists from '../views/Lists';
import ListsEditor from '../views/ListsEditor';
-import ReminderEditor from '../views/ReminderEditor';
import Login from '../views/Login';
-import Signup from '../views/Signup';
-import ForgotPassword from '../views/ForgotPassword';
-import Settings from '../views/Settings';
-import Trash from '../views/Trash';
+import Notebook from '../views/Notebook';
import Notes from '../views/Notes';
+import ReminderEditor from '../views/ReminderEditor';
+import Reminders from '../views/Reminders';
+import Settings from '../views/Settings';
+import Signup from '../views/Signup';
import Tags from '../views/Tags';
-import Notebook from '../views/Notebook';
-import AccountSettings from '../views/AccountSettings';
+import Trash from '../views/Trash';
const fade = props => {
const {position, scene} = props;