From 764c7cd5694a41c98d8543b68d7791fa90db4291 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 5 Sep 2023 10:42:19 -0700 Subject: Updates to use dynamic/responsive styles on web (#1351) * Move most responsive queries to the hook * Fix invalid CSS value * Fixes to tablet render of post thread * Fix overflow issues on web * Fix search header on tablet * Fix QP margin in web composer * Fix: only apply double gutter once to flatlist (close #1368) * Fix styles on discover feeds header * Fix double discover links in multifeed --- src/view/com/util/Views.web.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/view/com/util/Views.web.tsx') diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index 3313492e1..58a367f20 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -24,6 +24,7 @@ import { } from 'react-native' import {addStyle} from 'lib/styles' import {usePalette} from 'lib/hooks/usePalette' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' interface AddedProps { desktopFixedHeight?: boolean @@ -48,6 +49,7 @@ export const FlatList = React.forwardRef(function ( ref: React.Ref, ) { const pal = usePalette('default') + const {isMobile} = useWebMediaQueries() contentContainerStyle = addStyle( contentContainerStyle, styles.containerScroll, @@ -67,6 +69,12 @@ export const FlatList = React.forwardRef(function ( } if (desktopFixedHeight) { style = addStyle(style, styles.fixedHeight) + if (!isMobile) { + contentContainerStyle = addStyle( + contentContainerStyle, + styles.stableGutters, + ) + } } return (