about summary refs log tree commit diff
path: root/src/view/com/modals/Modal.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-22 17:14:20 -0500
committerGitHub <noreply@github.com>2023-04-22 17:14:20 -0500
commitd35f7c1f1a9f35958ff3f6dacd002e31b0a824b0 (patch)
tree6d69c883ef34fb3593d42641d25e421222e21635 /src/view/com/modals/Modal.tsx
parenteb6b36be61b38d2dab799d8f82b6f65645b9e3f6 (diff)
downloadvoidsky-d35f7c1f1a9f35958ff3f6dacd002e31b0a824b0.tar.zst
Android fixes (#515)
* Fix profile screen performance on android and remove dead code

* Correctly handle android hardware back btn

* Fix EditProfile modal for android

* Fix lint
Diffstat (limited to 'src/view/com/modals/Modal.tsx')
-rw-r--r--src/view/com/modals/Modal.tsx19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/view/com/modals/Modal.tsx b/src/view/com/modals/Modal.tsx
index 5d034a19d..df7d7f042 100644
--- a/src/view/com/modals/Modal.tsx
+++ b/src/view/com/modals/Modal.tsx
@@ -1,5 +1,6 @@
 import React, {useRef, useEffect} from 'react'
 import {StyleSheet} from 'react-native'
+import {SafeAreaView} from 'react-native-safe-area-context'
 import {observer} from 'mobx-react-lite'
 import BottomSheet from '@gorhom/bottom-sheet'
 import {useStores} from 'state/index'
@@ -92,13 +93,22 @@ export const ModalsContainer = observer(function ModalsContainer() {
     return null
   }
 
+  if (snapPoints[0] === 'fullscreen') {
+    return (
+      <SafeAreaView style={[styles.fullscreenContainer, pal.view]}>
+        {element}
+      </SafeAreaView>
+    )
+  }
+
   return (
     <BottomSheet
       ref={bottomSheetRef}
       snapPoints={snapPoints}
       index={store.shell.isModalActive ? 0 : -1}
       enablePanDownToClose
-      keyboardBehavior="fillParent"
+      keyboardBehavior="extend"
+      keyboardBlurBehavior="restore"
       backdropComponent={
         store.shell.isModalActive ? createCustomBackdrop(onClose) : undefined
       }
@@ -115,4 +125,11 @@ const styles = StyleSheet.create({
     borderTopLeftRadius: 10,
     borderTopRightRadius: 10,
   },
+  fullscreenContainer: {
+    position: 'absolute',
+    top: 0,
+    left: 0,
+    bottom: 0,
+    right: 0,
+  },
 })