Skip to content

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

minor refactoring

ammarahm-edb12c2d492fd6
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/AddNotebookDialog/index.js
index 23840d1bc..5a56e4375 100644
--- a/apps/mobile/src/components/AddNotebookDialog/index.js
+++ b/apps/mobile/src/components/AddNotebookDialog/index.js
@@ -513,9 +513,9 @@ const styles = StyleSheet.create({
alignItems: 'center',
},
container: {
- width: DDS.isTab ? '50%' : '100%',
- height: DDS.isTab ? '80%' : '100%',
- maxHeight: DDS.isTab ? '80%' : '100%',
+ width: DDS.isTab ? 500 : '100%',
+ height: DDS.isTab ? 600 : '100%',
+ maxHeight: DDS.isTab ? 600 : '100%',
borderRadius: DDS.isTab ? 5 : 0,
paddingHorizontal: ph,
paddingVertical: pv,
diff --git a/apps/mobile/src/services/Navigator.js b/apps/mobile/src/services/Navigator.js
index b55f84602..7dc0f1740 100644
--- a/apps/mobile/src/services/Navigator.js
+++ b/apps/mobile/src/services/Navigator.js
@@ -2,6 +2,7 @@ import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import * as React from 'react';
+import {Dimensions} from 'react-native';
import Container from '../components/Container';
import {Menu} from '../components/Menu';
import {rootNavigatorRef, sideMenuRef} from '../utils/refs';
@@ -61,7 +62,7 @@ const DrawerComponent = (props) => {
<Menu
menuProps={props}
hide={false}
- noTextMode={DDS.isTab}
+ noTextMode={DDS.isTab && !DDS.isSmallTab}
close={() => NavigationService.closeDrawer()}
/>
);
@@ -94,11 +95,15 @@ export const NavigationStack = ({component = MainComponent}) => {
swipeEnabled: locked ? false : true,
}}
drawerStyle={{
- width:DDS.isTab? w *0.04 : w*0.75,
- borderRightColor:'#f0f0f0'
+ width: DDS.isTab && !DDS.isSmallTab
+ ? Dimensions.get('window').width * 0.05
+ : DDS.isSmallTab
+ ? '40%'
+ : Dimensions.get('window').width * 0.75,
+ borderRightWidth: 0,
}}
edgeWidth={200}
- drawerType={DDS.isTab ? 'permanent' : 'slide'}
+ drawerType={DDS.isTab || DDS.isSmallTab ? 'permanent' : 'slide'}
drawerContent={DrawerComponent}
initialRouteName="Main">
<Drawer.Screen name="Main" component={component} />
diff --git a/apps/mobile/src/utils/storage.js b/apps/mobile/src/utils/storage.js
index 1f11cf998..685100844 100644
--- a/apps/mobile/src/utils/storage.js
+++ b/apps/mobile/src/utils/storage.js
@@ -7,6 +7,8 @@ import {generateSecureRandom} from 'react-native-securerandom';
import Sodium from 'react-native-sodium';
import RNFetchBlob from 'rn-fetch-blob';
import {db, requestStoragePermission, ToastEvent} from './utils';
+
+
export const MMKV = new MMKVStorage.Loader().initialize();
async function read(key, isArray = false) {
let data;