Skip to content

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

remove SafeAreaView

ammarahm-ed2dc79c1110c3
diff --git a/apps/mobile/src/screens/editor/index.tsx b/apps/mobile/src/screens/editor/index.tsx
index e1f878543..1a244e65f 100755
--- a/apps/mobile/src/screens/editor/index.tsx
+++ b/apps/mobile/src/screens/editor/index.tsx
@@ -1,6 +1,6 @@
import { EV, EVENTS } from 'notes-core/common';
-import React, { forwardRef, RefObject, useEffect, useImperativeHandle } from 'react';
-import { Linking, ViewStyle } from 'react-native';
+import React, { forwardRef, useEffect, useImperativeHandle } from 'react';
+import { ViewStyle } from 'react-native';
import WebView from 'react-native-webview';
import { ShouldStartLoadRequest } from 'react-native-webview/lib/WebViewTypes';
import { notesnook } from '../../../e2e/test.ids';
@@ -24,8 +24,9 @@ const style: ViewStyle = {
backgroundColor: 'transparent'
};
const onShouldStartLoadWithRequest = (request: ShouldStartLoadRequest) => {
- Linking.openURL(request.url);
- return false;
+ // if (request.url.startsWith('http://')) return true;
+ // Linking.openURL(request.url);
+ return true;
};
const Editor = React.memo(
@@ -114,6 +115,7 @@ const Editor = React.memo(
focusable={true}
setSupportMultipleWindows={false}
overScrollMode="never"
+ scrollEnabled={false}
keyboardDisplayRequiresUserAction={false}
onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
cacheMode="LOAD_DEFAULT"
@@ -129,7 +131,7 @@ const Editor = React.memo(
allowUniversalAccessFromFileURLs={true}
originWhitelist={['*']}
source={{
- uri: __DEV__ ? 'http://localhost:3000/' : EDITOR_URI
+ uri: __DEV__ ? 'http://192.168.10.7:3000/' : EDITOR_URI
}}
style={style}
autoManageStatusBarEnabled={false}
diff --git a/apps/mobile/src/screens/editor/wrapper.js b/apps/mobile/src/screens/editor/wrapper.js
index 0fc69fbff..61a1292c4 100644
--- a/apps/mobile/src/screens/editor/wrapper.js
+++ b/apps/mobile/src/screens/editor/wrapper.js
@@ -16,7 +16,6 @@ import { useSettingStore } from '../../stores/use-setting-store';
import { useThemeStore } from '../../stores/use-theme-store';
import { editorRef } from '../../utils/global-refs';
import useIsFloatingKeyboard from '../../utils/hooks/use-is-floating-keyboard';
-import EditorOverlay from './loading';
import { ProgressBar } from './progress';
import { editorController, editorState, textInput } from './tiptap/utils';
@@ -56,30 +55,24 @@ export const EditorWrapper = ({ width }) => {
}}
>
{loading || !introCompleted ? null : (
- <SafeAreaView
+ <KeyboardAvoidingView
+ behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={{
flex: 1
}}
+ enabled={!floating}
+ keyboardVerticalOffset={0}
>
- <KeyboardAvoidingView
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
- style={{
- flex: 1
- }}
- enabled={!floating}
- keyboardVerticalOffset={0}
- >
- <PremiumToast key="toast" context="editor" offset={50 + insets.top} />
- <TextInput
- key="input"
- ref={textInput}
- style={{ height: 1, padding: 0, width: 1, position: 'absolute' }}
- blurOnSubmit={false}
- />
- <ProgressBar />
- <Editor key="editor" withController={true} />
- </KeyboardAvoidingView>
- </SafeAreaView>
+ <PremiumToast key="toast" context="editor" offset={50 + insets.top} />
+ <TextInput
+ key="input"
+ ref={textInput}
+ style={{ height: 1, padding: 0, width: 1, position: 'absolute' }}
+ blurOnSubmit={false}
+ />
+ <ProgressBar />
+ <Editor key="editor" withController={true} />
+ </KeyboardAvoidingView>
)}
</View>
);