Skip to content

Commit

Permalink
only show the offline indicator in wide screen in non narrow layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Jun 14, 2024
1 parent 2a641d9 commit aa7caa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ScreenWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function ScreenWrapper(
const navigationFallback = useNavigation<StackNavigationProp<RootStackParamList>>();
const navigation = navigationProp ?? navigationFallback;
const {windowHeight} = useWindowDimensions(shouldUseCachedViewportHeight);
const {isSmallScreenWidth} = useResponsiveLayout();
const {isSmallScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
const {initialHeight} = useInitialDimensions();
const styles = useThemeStyles();
const keyboardState = useKeyboardState();
Expand Down Expand Up @@ -279,7 +279,7 @@ function ScreenWrapper(
: children
}
{isSmallScreenWidth && shouldShowOfflineIndicator && <OfflineIndicator style={offlineIndicatorStyle} />}
{!isSmallScreenWidth && shouldShowOfflineIndicatorInWideScreen && (
{!shouldUseNarrowLayout && shouldShowOfflineIndicatorInWideScreen && (
<OfflineIndicator
containerStyles={[]}
style={[styles.pl5, styles.offlineIndicatorRow, offlineIndicatorStyle]}
Expand Down

0 comments on commit aa7caa7

Please sign in to comment.