From 465fd6228367f2e0afbafc9d2b8cbfbcd00b8448 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Mon, 19 Sep 2022 09:21:59 +0500 Subject: [PATCH] mobile: fix bottom safe area margins --- apps/mobile/app/app.js | 7 +++---- apps/mobile/app/screens/editor/wrapper.js | 9 +++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/mobile/app/app.js b/apps/mobile/app/app.js index 2108eba9f..c9df8ee91 100644 --- a/apps/mobile/app/app.js +++ b/apps/mobile/app/app.js @@ -59,10 +59,9 @@ const App = () => { diff --git a/apps/mobile/app/screens/editor/wrapper.js b/apps/mobile/app/screens/editor/wrapper.js index b7208d15f..ee51be590 100644 --- a/apps/mobile/app/screens/editor/wrapper.js +++ b/apps/mobile/app/screens/editor/wrapper.js @@ -64,10 +64,11 @@ export const EditorWrapper = ({ width }) => { }, [loading]); const getMarginBottom = () => { - if (!keyboard.keyboardShown) return insets.bottom / 2; - if (Platform.isPad && !floating) return 16; - if (Platform.OS === "ios") return insets.bottom / 2; - return 6; + const bottomInsets = Platform.OS === "android" ? 14 : insets.bottom || 14; + if (!keyboard.keyboardShown) return bottomInsets / 1.5; + if (Platform.isPad && !floating) return bottomInsets; + if (Platform.OS === "ios") return bottomInsets / 1.5; + return bottomInsets; }; return (