From 815c4a8fb436cd70dd048ea30f0b475c23d65adf Mon Sep 17 00:00:00 2001 From: Batr Kanzitelli Date: Sun, 20 Dec 2020 10:00:44 +0100 Subject: [PATCH] custom workarounds removed --- src/App.ts | 3 --- src/screens/CounterScreen.tsx | 2 +- src/screens/ExpoScreen.tsx | 20 ++++---------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/App.ts b/src/App.ts index b74bc2e..1cd5f36 100644 --- a/src/App.ts +++ b/src/App.ts @@ -77,9 +77,6 @@ export const startApp = async () => { children: [{ component: { name: Constants.ScreenNames.ExpoScreen, - passProps: { - hackForTabScreenLargeTitleIOS14: true, - } }, }], options: { diff --git a/src/screens/CounterScreen.tsx b/src/screens/CounterScreen.tsx index cf20158..7042e03 100644 --- a/src/screens/CounterScreen.tsx +++ b/src/screens/CounterScreen.tsx @@ -23,7 +23,7 @@ const CounterScreen: NavigationFunctionComponent = observer(({ componentId, }) => { const { counter } = useStores(); - const { appUpdates } = useServices(); + const { } = useServices(); const { styles } = useStyles(_styles); useNavigationButtonPress(counter.decrement, componentId, Constants.CounterScreen.decButtonId); diff --git a/src/screens/ExpoScreen.tsx b/src/screens/ExpoScreen.tsx index 6c3b4e6..af37b5a 100644 --- a/src/screens/ExpoScreen.tsx +++ b/src/screens/ExpoScreen.tsx @@ -22,29 +22,17 @@ import { ButtonTitle } from '../components/Button'; import useStyles from '../utils/useStyles'; import NView from '../components/NView'; -type ExpoScreenProps = { - hackForTabScreenLargeTitleIOS14: boolean; // large title collapsed if a screen is on one of the tab but first -} +type ExpoScreenProps = { } const ExpoScreen: NavigationFunctionComponent = observer(({ componentId, - hackForTabScreenLargeTitleIOS14 = false, }) => { const { ui } = useStores(); const { navigation, t } = useServices(); const { styles } = useStyles(_styles); - const [safeArea, setSafeArea] = useState(false); // hack for Large Title + ScrollView - const [contentHidden, setContentHidden] = useState(hackForTabScreenLargeTitleIOS14); // hack for Large Title iOS14 on 2+ tab view - - useEffect(() => { - setTimeout(() => setSafeArea(true), 250); - }, [componentId]); - useNavigationComponentDidAppear(() => { getNetworkType(); - - setContentHidden(false); }, componentId); const getNetworkType = async () => { @@ -55,8 +43,8 @@ const ExpoScreen: NavigationFunctionComponent = observer(({ } catch (e) { } } - return contentHidden ? : ( - + return ( + <> @@ -94,7 +82,7 @@ const ExpoScreen: NavigationFunctionComponent = observer(({ /> - + ) });