Skip to content

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

fix Editor in landscape on mobile

ammarahm-ed9b7349d6dc44
diff --git a/apps/mobile/RootView.js b/apps/mobile/RootView.js
index f6ff0dfda..d34534160 100644
--- a/apps/mobile/RootView.js
+++ b/apps/mobile/RootView.js
@@ -118,7 +118,7 @@ const AppStack = React.memo(
editorRef.current?.setNativeProps({
style: {
position: 'relative',
- width: dimensions.width * 0.55,
+ width: size.width * 0.55,
zIndex: null,
paddingHorizontal: 0,
},
@@ -129,7 +129,7 @@ const AppStack = React.memo(
editorRef.current?.setNativeProps({
style: {
position: 'relative',
- width: '100%',
+ width: size.width,
zIndex: null,
paddingHorizontal: 0,
},
@@ -144,7 +144,7 @@ const AppStack = React.memo(
editorRef.current?.setNativeProps({
style: {
position: 'relative',
- width: '100%',
+ width: size.width,
zIndex: null,
paddingHorizontal: 0,
},
@@ -161,10 +161,19 @@ const AppStack = React.memo(
prerenderingSiblingsNumber={Infinity}
onChangeTab={onChangeTab}
renderTabBar={() => <></>}>
+ {!mode && (
+ <View
+ style={{
+ width: '100%',
+ height: '100%',
+ flexDirection: 'row',
+ backgroundColor: colors.bg,
+ }}
+ />
+ )}
{mode && mode !== 'tablet' && (
<NavigationStack component={NavigatorStack} />
)}
-
<View
style={{
width: '100%',
diff --git a/apps/mobile/src/views/Editor/EditorWrapper.js b/apps/mobile/src/views/Editor/EditorWrapper.js
index ef052bd71..83248894e 100644
--- a/apps/mobile/src/views/Editor/EditorWrapper.js
+++ b/apps/mobile/src/views/Editor/EditorWrapper.js
@@ -9,6 +9,7 @@ import {eSendEvent} from '../../services/EventManager';
import {eOnLoadNote} from '../../utils/Events';
import Editor from './index';
import {editorRef} from "../../utils/Refs"
+import { DDS } from '../../services/DeviceDetection';
let prevVal = 0;
let finalValue = 80;
let anim2 = new Animated.Value(0);
@@ -87,7 +88,7 @@ export const EditorWrapper = ({dimensions}) => {
<SafeAreaView
ref={editorRef}
style={{
- width: dimensions.width * 0.55,
+ width:DDS.isLargeTablet()? dimensions.width * 0.55 : dimensions.width,
height: '100%',
backgroundColor: colors.bg,
}}>