Skip to content

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

refactor

ammarahm-edef6fb38584b1
diff --git a/apps/mobile/App.js b/apps/mobile/App.js
index 45e6fac68..b6d327c1c 100644
--- a/apps/mobile/App.js
+++ b/apps/mobile/App.js
@@ -17,7 +17,6 @@ import {Toast} from './src/components/Toast';
import {useTracked} from './src/provider';
import {ACTIONS} from './src/provider/actions';
import Orientation from 'react-native-orientation';
-
import {eSubscribeEvent, eUnSubscribeEvent} from './src/services/eventManager';
import {
eCloseFullscreenEditor,
@@ -35,8 +34,7 @@ import {DeviceDetectionService} from './src/utils/deviceDetection';
import StorageInterface from './src/utils/storage';
import {w} from './src/utils/utils';
import Editor from './src/views/Editor';
-import Animated, {Easing} from 'react-native-reanimated';
-import {useForceUpdate} from './src/views/ListsEditor';
+import Animated from 'react-native-reanimated';
import MMKV from 'react-native-mmkv-storage';
import {defaultState} from './src/provider/defaultState';
import {EditorPosition} from './src/utils/animations';
@@ -47,12 +45,9 @@ let sideMenuRef;
let editorRef;
let outColors;
-const {color, Value, timing, interpolate} = Animated;
-
const App = () => {
const [state, dispatch] = useTracked();
const {colors, loading} = state;
- const forceUpdate = useForceUpdate();
const [init, setInit] = useState(false);
const [fullscreen, setFullscreen] = useState(false);
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js
index 8719dff28..c32b9e630 100644
--- a/apps/mobile/src/components/ActionSheetComponent/index.js
+++ b/apps/mobile/src/components/ActionSheetComponent/index.js
@@ -1,4 +1,4 @@
-import React, {useEffect, useState, createRef} from 'react';
+import React, {createRef, useEffect, useState} from 'react';
import {
Dimensions,
StatusBar,
@@ -6,10 +6,9 @@ import {
TextInput,
TouchableOpacity,
View,
- Platform,
- ToastAndroid,
} from 'react-native';
import MMKV from 'react-native-mmkv-storage';
+import Share from 'react-native-share';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {db, DDS} from '../../../App';
import {
@@ -18,21 +17,18 @@ import {
COLOR_SCHEME_DARK,
COLOR_SCHEME_LIGHT,
opacity,
+ ph,
pv,
setColorScheme,
SIZE,
WEIGHT,
- ph,
} from '../../common/common';
import {useTracked} from '../../provider';
import {ACTIONS} from '../../provider/actions';
-import {moveNoteEvent} from '../DialogManager';
-import Share from 'react-native-share';
-import {timeConverter, ToastEvent, hexToRGBA} from '../../utils/utils';
import NavigationService from '../../services/NavigationService';
-import {eSendEvent} from '../../services/eventManager';
-import {eOpenVaultDialog} from '../../services/events';
-import {openVault} from '../VaultDialog';
+import {timeConverter, ToastEvent} from '../../utils/utils';
+import {openVault} from '../../services/eventManager';
+
const w = Dimensions.get('window').width;
const h = Dimensions.get('window').height;
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/AddNotebookDialog/index.js
index bee0c96c6..8bfd710f2 100644
--- a/apps/mobile/src/components/AddNotebookDialog/index.js
+++ b/apps/mobile/src/components/AddNotebookDialog/index.js
@@ -13,7 +13,7 @@ import {db, DDS} from '../../../App';
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
import {ACTIONS} from '../../provider/actions';
import {getElevation, ToastEvent} from '../../utils/utils';
-import {updateEvent} from '../DialogManager';
+import {updateEvent} from '../DialogManager/recievers';
let refs = [];
diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.js
index 52fb528b5..9390cf5ec 100644
--- a/apps/mobile/src/components/Dialog/index.js
+++ b/apps/mobile/src/components/Dialog/index.js
@@ -13,7 +13,8 @@ import {
import NavigationService from '../../services/NavigationService';
import {exitEditorAnimation} from '../../utils/animations';
import {editing, getElevation, history, ToastEvent} from '../../utils/utils';
-import {dialogActions, updateEvent} from '../DialogManager';
+import {updateEvent} from '../DialogManager/recievers';
+import {dialogActions} from '../DialogManager/dialogActions';
export class Dialog extends Component {
constructor(props) {
diff --git a/apps/mobile/src/components/DialogManager/dialogActions.js b/apps/mobile/src/components/DialogManager/dialogActions.js
new file mode 100644
index 000000000..1e921a3e5
--- /dev/null
+++ b/apps/mobile/src/components/DialogManager/dialogActions.js
@@ -0,0 +1,8 @@
+export const dialogActions = {
+ ACTION_DELETE: 511,
+ ACTION_EXIT: 512,
+ ACTION_EMPTY_TRASH: 513,
+ ACTION_EXIT_FULLSCREEN: 514,
+ ACTION_TRASH: 515,
+ ACTION_PERMANANT_DELETE: 516,
+};
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 49aeb72c2..0ccdb06a0 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -1,9 +1,9 @@
import React, {Component} from 'react';
import {DDS} from '../../../App';
import {
- eSendEvent,
eSubscribeEvent,
eUnSubscribeEvent,
+ openVault,
} from '../../services/eventManager';
import {
eCloseActionSheet,
@@ -12,7 +12,6 @@ import {
eCloseLoginDialog,
eCloseMoveNoteDialog,
eCloseSimpleDialog,
- eDispatchAction,
eOnLoadNote,
eOpenActionSheet,
eOpenAddNotebookDialog,
@@ -20,8 +19,6 @@ import {
eOpenLoginDialog,
eOpenMoveNoteDialog,
eOpenSimpleDialog,
- eOpenVaultDialog,
- eCloseVaultDialog,
} from '../../services/events';
import ActionSheet from '../ActionSheet';
import {ActionSheetComponent} from '../ActionSheetComponent';
@@ -30,146 +27,11 @@ import {AddTopicDialog} from '../AddTopicDialog';
import {Dialog} from '../Dialog';
import LoginDialog from '../LoginDialog';
import MoveNoteDialog from '../MoveNoteDialog';
-import {VaultDialog, openVault} from '../VaultDialog';
-import {timeConverter, hexToRGBA} from '../../utils/utils';
+import {VaultDialog} from '../VaultDialog';
+import {hexToRGBA} from '../../utils/utils';
import {Platform} from 'react-native';
-
-export const dialogActions = {
- ACTION_DELETE: 511,
- ACTION_EXIT: 512,
- ACTION_EMPTY_TRASH: 513,
- ACTION_EXIT_FULLSCREEN: 514,
- ACTION_TRASH: 515,
- ACTION_PERMANANT_DELETE: 516,
-};
-
-export const ActionSheetEvent = (
- item,
- colors,
- tags,
- rowItems,
- columnItems,
- extraData,
-) => {
- eSendEvent(eOpenActionSheet, {
- item,
- colors,
- tags,
- rowItems,
- columnItems,
- extraData,
- });
-};
-export const ActionSheetHideEvent = () => {
- eSendEvent(eCloseActionSheet);
-};
-
-export const simpleDialogEvent = data => {
- eSendEvent(eOpenSimpleDialog, data);
-};
-
-export const simpleDialogHideEvent = () => {
- eSendEvent(eCloseSimpleDialog);
-};
-
-export const moveNoteEvent = () => {
- eSendEvent(eOpenMoveNoteDialog);
-};
-export const moveNoteHideEvent = () => {
- eSendEvent(eCloseMoveNoteDialog);
-};
-
-export const AddNotebookEvent = notebook => {
- eSendEvent(eOpenAddNotebookDialog, {item: notebook});
-};
-export const HideAddNotebookEvent = notebook => {
- eSendEvent(eCloseAddNotebookDialog, notebook);
-};
-export const AddTopicEvent = notebook => {
- eSendEvent(eOpenAddTopicDialog, notebook);
-};
-export const HideAddTopicEvent = notebook => {
- eSendEvent(eCloseAddTopicDialog, notebook);
-};
-
-export const updateEvent = data => {
- eSendEvent(eDispatchAction, data);
-};
-
-export const TEMPLATE_DELETE = type => {
- return {
- title: `Delete ${type}`,
- paragraph: `Are you sure you want to delete this ${type}`,
- positiveText: 'Delete',
- negativeText: 'Cancel',
- action: dialogActions.ACTION_DELETE,
- icon: 'delete',
- };
-};
-
-export const TEMPLATE_PERMANANT_DELETE = {
- title: `Delete Permanantly`,
- paragraph: `Are you sure you want to delete this item permanantly from trash?`,
- positiveText: 'Delete',
- negativeText: 'Cancel',
- action: dialogActions.ACTION_PERMANANT_DELETE,
- icon: 'delete',
-};
-
-export const TEMPLATE_TRASH = type => {
- return {
- title: `Delete ${type}`,
- paragraph: `Restore or delete ${type} forever`,
- positiveText: 'Restore',
- negativeText: 'Delete',
- action: dialogActions.ACTION_TRASH,
- icon: 'delete-restore',
- };
-};
-
-export const TEMPLATE_EXIT_FULLSCREEN = () => {
- return {
- title: `Exit fullscreen editor?`,
- paragraph: `Are you sure you want to exit fullscreen editor?`,
- positiveText: 'Exit',
- negativeText: 'Cancel',
- action: dialogActions.ACTION_EXIT_FULLSCREEN,
- icon: 'close',
- };
-};
-
-export const TEMPLATE_EXIT = type => {
- return {
- title: `Close ${type}`,
- paragraph: `Are you sure you want to close ${type}`,
- positiveText: `Close`,
- negativeText: 'Cancel',
- action: dialogActions.ACTION_EXIT,
- icon: 'close',
- };
-};
-
-export const TEMPLATE_INFO = dateCreated => {
- return {
- title: `Note Info`,
- paragraph: `Created on ${timeConverter(dateCreated)} `,
- positiveText: ``,
- negativeText: '',
- noButtons: true,
- noTitle: true,
- action: dialogActions.ACTION_CLOSE,
- icon: 'information-outline',
- };
-};
-
-export const TEMPLATE_EMPTY_TRASH = {
- title: 'Empty Trash',
- paragraph: 'Are you sure you want to clear the trash?',
- icon: 'delete-outline',
- positiveText: 'Clear',
- negativeText: 'Cancel',
- action: dialogActions.ACTION_EMPTY_TRASH,
-};
+import {TEMPLATE_DELETE, TEMPLATE_PERMANANT_DELETE} from './templates';
+import {moveNoteEvent} from './recievers';
export class DialogManager extends Component {
constructor(props) {
diff --git a/apps/mobile/src/components/DialogManager/recievers.js b/apps/mobile/src/components/DialogManager/recievers.js
new file mode 100644
index 000000000..882fb56cc
--- /dev/null
+++ b/apps/mobile/src/components/DialogManager/recievers.js
@@ -0,0 +1,66 @@
+import {eSendEvent} from '../../services/eventManager';
+import {
+ eCloseActionSheet,
+ eCloseAddNotebookDialog,
+ eCloseAddTopicDialog,
+ eCloseMoveNoteDialog,
+ eCloseSimpleDialog,
+ eOpenActionSheet,
+ eOpenAddNotebookDialog,
+ eOpenAddTopicDialog,
+ eOpenMoveNoteDialog,
+ eOpenSimpleDialog,
+} from '../../services/events';
+
+export const ActionSheetEvent = (
+ item,
+ colors,
+ tags,
+ rowItems,
+ columnItems,
+ extraData,
+) => {
+ eSendEvent(eOpenActionSheet, {
+ item,
+ colors,
+ tags,
+ rowItems,
+ columnItems,
+ extraData,
+ });
+};
+export const ActionSheetHideEvent = () => {
+ eSendEvent(eCloseActionSheet);
+};
+
+export const simpleDialogEvent = data => {
+ eSendEvent(eOpenSimpleDialog, data);
+};
+
+export const simpleDialogHideEvent = () => {
+ eSendEvent(eCloseSimpleDialog);
+};
+
+export const moveNoteEvent = () => {
+ eSendEvent(eOpenMoveNoteDialog);
+};
+export const moveNoteHideEvent = () => {
+ eSendEvent(eCloseMoveNoteDialog);
+};
+
+export const AddNotebookEvent = notebook => {
+ eSendEvent(eOpenAddNotebookDialog, {item: notebook});
+};
+export const HideAddNotebookEvent = notebook => {
+ eSendEvent(eCloseAddNotebookDialog, notebook);
+};
+export const AddTopicEvent = notebook => {
+ eSendEvent(eOpenAddTopicDialog, notebook);
+};
+export const HideAddTopicEvent = notebook => {
+ eSendEvent(eCloseAddTopicDialog, notebook);
+};
+
+export const updateEvent = data => {
+ eSendEvent(eDispatchAction, data);
+};
diff --git a/apps/mobile/src/components/DialogManager/templates.js b/apps/mobile/src/components/DialogManager/templates.js
new file mode 100644
index 000000000..19d0e51b2
--- /dev/null
+++ b/apps/mobile/src/components/DialogManager/templates.js
@@ -0,0 +1,76 @@
+import {dialogActions} from './dialogActions';
+
+export const TEMPLATE_DELETE = type => {
+ return {
+ title: `Delete ${type}`,
+ paragraph: `Are you sure you want to delete this ${type}`,
+ positiveText: 'Delete',
+ negativeText: 'Cancel',
+ action: dialogActions.ACTION_DELETE,
+ icon: 'delete',
+ };
+};
+
+export const TEMPLATE_PERMANANT_DELETE = {
+ title: `Delete Permanantly`,
+ paragraph: `Are you sure you want to delete this item permanantly from trash?`,
+ positiveText: 'Delete',
+ negativeText: 'Cancel',
+ action: dialogActions.ACTION_PERMANANT_DELETE,
+ icon: 'delete',
+};
+
+export const TEMPLATE_TRASH = type => {
+ return {
+ title: `Delete ${type}`,
+ paragraph: `Restore or delete ${type} forever`,
+ positiveText: 'Restore',
+ negativeText: 'Delete',
+ action: dialogActions.ACTION_TRASH,
+ icon: 'delete-restore',
+ };
+};
+
+export const TEMPLATE_EXIT_FULLSCREEN = () => {
+ return {
+ title: `Exit fullscreen editor?`,
+ paragraph: `Are you sure you want to exit fullscreen editor?`,
+ positiveText: 'Exit',
+ negativeText: 'Cancel',
+ action: dialogActions.ACTION_EXIT_FULLSCREEN,
+ icon: 'close',
+ };
+};
+
+export const TEMPLATE_EXIT = type => {
+ return {
+ title: `Close ${type}`,
+ paragraph: `Are you sure you want to close ${type}`,
+ positiveText: `Close`,
+ negativeText: 'Cancel',
+ action: dialogActions.ACTION_EXIT,
+ icon: 'close',
+ };
+};
+
+export const TEMPLATE_INFO = dateCreated => {
+ return {
+ title: `Note Info`,
+ paragraph: `Created on ${timeConverter(dateCreated)} `,
+ positiveText: ``,
+ negativeText: '',
+ noButtons: true,
+ noTitle: true,
+ action: dialogActions.ACTION_CLOSE,
+ icon: 'information-outline',
+ };
+};
+
+export const TEMPLATE_EMPTY_TRASH = {
+ title: 'Empty Trash',
+ paragraph: 'Are you sure you want to clear the trash?',
+ icon: 'delete-outline',
+ positiveText: 'Clear',
+ negativeText: 'Cancel',
+ action: dialogActions.ACTION_EMPTY_TRASH,
+};
diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.js
index 333dcd5de..ba97d300f 100644
--- a/apps/mobile/src/components/LoginDialog/index.js
+++ b/apps/mobile/src/components/LoginDialog/index.js
@@ -3,7 +3,6 @@ import {Modal, DeviceEventEmitter, View, TouchableOpacity} from 'react-native';
import {createAppContainer} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
import {ACTIONS} from '../../provider/actions';
-import {updateEvent} from '../DialogManager';
import * as Animatable from 'react-native-animatable';
import Login from '../../views/Login';
import Signup from '../../views/Signup';
@@ -13,6 +12,7 @@ import {getElevation, w} from '../../utils/utils';
import {eSendEvent} from '../../services/eventManager';
import {eLoginDialogNavigateBack} from '../../services/events';
import {normalize} from '../../common/common';
+import {updateEvent} from '../DialogManager/recievers';
const fade = props => {
const {position, scene} = props;
diff --git a/apps/mobile/src/components/MoveNoteDialog/index.js b/apps/mobile/src/components/MoveNoteDialog/index.js
index c2e8067b4..bc0b85f39 100644
--- a/apps/mobile/src/components/MoveNoteDialog/index.js
+++ b/apps/mobile/src/components/MoveNoteDialog/index.js
@@ -6,12 +6,13 @@ import {ACTIONS} from '../../provider/actions';
import Folders from '../../views/Folders';
import Notebook from '../../views/Notebook';
import Notes from '../../views/Notes';
-import {updateEvent} from '../DialogManager';
+
import * as Animatable from 'react-native-animatable';
import {DDS} from '../../../App';
import {getElevation} from '../../utils/utils';
import {eSendEvent} from '../../services/eventManager';
import {eMoveNoteDialogNavigateBack} from '../../services/events';
+import {updateEvent} from '../DialogManager/recievers';
const fade = props => {
const {position, scene} = props;
diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js
index 4a6983a42..8f2a99866 100644
--- a/apps/mobile/src/components/NoteItem/index.js
+++ b/apps/mobile/src/components/NoteItem/index.js
@@ -3,17 +3,12 @@ import {Dimensions, Text, TouchableOpacity, View} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {DDS} from '../../../App';
import {ph, pv, SIZE, WEIGHT} from '../../common/common';
-import {eSendEvent} from '../../services/eventManager';
-import {eOnLoadNote, eOpenVaultDialog} from '../../services/events';
-import NavigationService from '../../services/NavigationService';
-import {getElevation, timeSince} from '../../utils/utils';
-import {
- ActionSheetEvent,
- simpleDialogEvent,
- TEMPLATE_TRASH,
-} from '../DialogManager';
+import {eSendEvent, openVault} from '../../services/eventManager';
+import {eOnLoadNote} from '../../services/events';
import {openEditorAnimation} from '../../utils/animations';
-import {openVault} from '../VaultDialog';
+import {getElevation, timeSince} from '../../utils/utils';
+import {ActionSheetEvent, simpleDialogEvent} from '../DialogManager/recievers';
+import {TEMPLATE_TRASH} from '../DialogManager/templates';
const w = Dimensions.get('window').width;
const h = Dimensions.get('window').height;
diff --git a/apps/mobile/src/components/VaultDialog/index.js b/apps/mobile/src/components/VaultDialog/index.js
index 41df8b038..a43cdc5e8 100644
--- a/apps/mobile/src/components/VaultDialog/index.js
+++ b/apps/mobile/src/components/VaultDialog/index.js
@@ -5,8 +5,6 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {TextInput} from 'react-native-gesture-handler';
import {db, DDS} from '../../../App';
import {getElevation, ToastEvent, editing} from '../../utils/utils';
-
-import {updateEvent} from '../DialogManager';
import Share from 'react-native-share';
import {
eSendEvent,
@@ -22,31 +20,11 @@ import {
import {openEditorAnimation} from '../../utils/animations';
import {ACTIONS} from '../../provider/actions';
import {Toast} from '../Toast';
+import {updateEvent} from '../DialogManager/recievers';
const passInputRef = createRef();
const confirmPassRef = createRef();
-export const openVault = (
- item,
- novault = false,
- locked = false,
- permanant = false,
- editor = false,
- share = false,
- deleteNote = false,
-) => {
- console.log(editor, 'hello');
- eSendEvent(eOpenVaultDialog, {
- item,
- novault,
- locked,
- permanant,
- goToEditor: editor,
- share,
- deleteNote,
- });
-};
-
export class VaultDialog extends Component {
constructor(props) {
super(props);
diff --git a/apps/mobile/src/services/eventManager.js b/apps/mobile/src/services/eventManager.js
index f5137e8fd..90af9d54a 100644
--- a/apps/mobile/src/services/eventManager.js
+++ b/apps/mobile/src/services/eventManager.js
@@ -11,3 +11,23 @@ export const eUnSubscribeEvent = (eventName, action) => {
export const eSendEvent = (eventName, data) => {
DeviceEventEmitter.emit(eventName, data);
};
+
+export const openVault = (
+ item,
+ novault = false,
+ locked = false,
+ permanant = false,
+ editor = false,
+ share = false,
+ deleteNote = false,
+) => {
+ eSendEvent(eOpenVaultDialog, {
+ item,
+ novault,
+ locked,
+ permanant,
+ goToEditor: editor,
+ share,
+ deleteNote,
+ });
+};
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.js
index 2938d7b65..7997012bd 100755
--- a/apps/mobile/src/views/Editor/index.js
+++ b/apps/mobile/src/views/Editor/index.js
@@ -14,12 +14,6 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import WebView from 'react-native-webview';
import {db, DDS} from '../../../App';
import {normalize, SIZE, WEIGHT} from '../../common/common';
-import {
- ActionSheetEvent,
- simpleDialogEvent,
- TEMPLATE_EXIT_FULLSCREEN,
- TEMPLATE_INFO,
-} from '../../components/DialogManager';
import {useTracked} from '../../provider';
import {ACTIONS} from '../../provider/actions';
import {
@@ -40,6 +34,14 @@ import {
timeConverter,
ToastEvent,
} from '../../utils/utils';
+import {
+ ActionSheetEvent,
+ simpleDialogEvent,
+} from '../../components/DialogManager/recievers';
+import {
+ TEMPLATE_INFO,
+ TEMPLATE_EXIT_FULLSCREEN,
+} from '../../components/DialogManager/templates';
const EditorWebView = createRef();
let note = {};
@@ -50,7 +52,7 @@ let timer = null;
let saveCounter = 0;
let tapCount = 0;
-const Editor = ({navigation, noMenu}) => {
+const Editor = ({noMenu}) => {
// Global State
const [state, dispatch] = useTracked();
const {colors} = state;
@@ -625,13 +627,4 @@ const Editor = ({navigation, noMenu}) => {
);
};
-Editor.navigationOptions = {
- header: null,
- headerStyle: {
- backgroundColor: 'transparent',
- borderBottomWidth: 0,
- height: 0,
- },
-};
-
export default Editor;
diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.js
index 6de3a882c..425d528db 100644
--- a/apps/mobile/src/views/Folders/index.js
+++ b/apps/mobile/src/views/Folders/index.js
@@ -1,28 +1,18 @@
import React, {useEffect, useState} from 'react';
-import {
- BackHandler,
- FlatList,
- Platform,
- Text,
- View,
- RefreshControl,
-} from 'react-native';
+import {BackHandler} from 'react-native';
import {useIsFocused} from 'react-navigation-hooks';
-import {DDS} from '../../../App';
-import {SIZE, WEIGHT} from '../../common/common';
import Container from '../../components/Container';
-import {AddNotebookEvent} from '../../components/DialogManager';
import {NotebookPlaceHolder} from '../../components/ListPlaceholders';
import {NotebookItem} from '../../components/NotebookItem';
import SelectionWrapper from '../../components/SelectionWrapper';
+import SimpleList from '../../components/SimpleList';
import {useTracked} from '../../provider';
import {ACTIONS} from '../../provider/actions';
import {eSendEvent} from '../../services/eventManager';
import {eScrollEvent} from '../../services/events';
import {slideLeft, slideRight} from '../../utils/animations';
-import {w, ToastEvent, hexToRGBA} from '../../utils/utils';
-import {inputRef} from '../../components/SearchInput';
-import SimpleList from '../../components/SimpleList';
+import {ToastEvent, w} from '../../utils/utils';
+import {AddNotebookEvent} from '../../components/DialogManager/recievers';
export const Folders = ({navigation}) => {
const [state, dispatch] = useTracked();
@@ -33,7 +23,6 @@ export const Folders = ({navigation}) => {
notebooks,
preventDefaultMargins,
} = state;
- const searchResults = {...state.searchResults};
const [refreshing, setRefreshing] = useState(false);
let isFocused = useIsFocused();
diff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/views/Notebook/index.js
index 7533284d9..dc7486670 100644
--- a/apps/mobile/src/views/Notebook/index.js
+++ b/apps/mobile/src/views/Notebook/index.js
@@ -2,7 +2,6 @@ import React, {useEffect, useState} from 'react';
import {useIsFocused} from 'react-navigation-hooks';
import {db} from '../../../App';
import Container from '../../components/Container';
-import {AddTopicEvent} from '../../components/DialogManager';
import {NotebookItem} from '../../components/NotebookItem';
import SelectionWrapper from '../../components/SelectionWrapper';
import {useTracked} from '../../provider';
@@ -20,6 +19,7 @@ import {
import {ToastEvent, w} from '../../utils/utils';
import SimpleList from '../../components/SimpleList';
import {NotebookPlaceHolder} from '../../components/ListPlaceholders';
+import {AddTopicEvent} from '../../components/DialogManager/recievers';
export const Notebook = ({navigation}) => {
const [state, dispatch] = useTracked();
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index 86361f54e..ca302f170 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -25,10 +25,10 @@ import {w, hexToRGBA, getElevation} from '../../utils/utils';
import {ACTIONS} from '../../provider/actions';
import MMKV from 'react-native-mmkv-storage';
import {DDS} from '../../../App';
-import {updateEvent} from '../../components/DialogManager';
import {eSendEvent} from '../../services/eventManager';
import {eOpenLoginDialog} from '../../services/events';
import NavigationService from '../../services/NavigationService';
+import {updateEvent} from '../../components/DialogManager/recievers';
export async function setSetting(settings, name, value) {
let s = {...settings};
@@ -330,8 +330,8 @@ export const Settings = ({navigation}) => {
}}>
<View
style={{
- width: w / 5 - 22,
- height: w / 5 - 22,
+ width: w / 5 - 35,
+ height: w / 5 - 35,
backgroundColor: item,
borderRadius: 100,
justifyContent: 'center',