From 6956000ec53450f0d5fb295706af26e4add652d7 Mon Sep 17 00:00:00 2001 From: sarious Date: Sat, 4 Nov 2023 22:34:45 +0400 Subject: [PATCH 1/2] fix an issue with min height of screen when Offline Indicator is shown --- src/components/ScreenWrapper/index.js | 4 ++-- src/hooks/useInitialWindowDimensions/index.js | 5 +---- src/pages/EditRequestAmountPage.js | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 4563c7149e97..01a19f0a87a4 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -118,7 +118,7 @@ function ScreenWrapper({ return ( diff --git a/src/hooks/useInitialWindowDimensions/index.js b/src/hooks/useInitialWindowDimensions/index.js index 487b4e498228..5878c8b3371f 100644 --- a/src/hooks/useInitialWindowDimensions/index.js +++ b/src/hooks/useInitialWindowDimensions/index.js @@ -1,7 +1,6 @@ // eslint-disable-next-line no-restricted-imports import {useEffect, useState} from 'react'; import {Dimensions} from 'react-native'; -import {initialWindowMetrics} from 'react-native-safe-area-context'; /** * A convenience hook that provides initial size (width and height). @@ -50,10 +49,8 @@ export default function () { }; }, []); - const bottomInset = initialWindowMetrics && initialWindowMetrics.insets && initialWindowMetrics.insets.bottom ? initialWindowMetrics.insets.bottom : 0; - return { initialWidth: dimensions.initialWidth, - initialHeight: dimensions.initialHeight - bottomInset, + initialHeight: dimensions.initialHeight, }; } diff --git a/src/pages/EditRequestAmountPage.js b/src/pages/EditRequestAmountPage.js index 5fb26e961fad..b5db4f2faa78 100644 --- a/src/pages/EditRequestAmountPage.js +++ b/src/pages/EditRequestAmountPage.js @@ -43,6 +43,7 @@ function EditRequestAmountPage({defaultAmount, defaultCurrency, onNavigateToCurr return ( Date: Sun, 5 Nov 2023 01:45:41 +0400 Subject: [PATCH 2/2] remove shouldEnableMaxHeight, because it interferes with work of minHeight --- src/pages/EditRequestAmountPage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/EditRequestAmountPage.js b/src/pages/EditRequestAmountPage.js index b5db4f2faa78..b6b33774e0fe 100644 --- a/src/pages/EditRequestAmountPage.js +++ b/src/pages/EditRequestAmountPage.js @@ -44,7 +44,6 @@ function EditRequestAmountPage({defaultAmount, defaultCurrency, onNavigateToCurr