From 532c92454441335e3119f9b8c11db26ad79d5790 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 19 Jan 2024 01:38:08 +0000 Subject: [PATCH] fixes --- src/lib/styles.ts | 4 ++-- src/view/com/feeds/FeedPage.tsx | 11 +---------- src/view/com/pager/FeedsTabBar.web.tsx | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/styles.ts b/src/lib/styles.ts index 5a10fea864..df9b49260b 100644 --- a/src/lib/styles.ts +++ b/src/lib/styles.ts @@ -1,6 +1,6 @@ import {Dimensions, StyleProp, StyleSheet, TextStyle} from 'react-native' import {Theme, TypographyVariant} from './ThemeContext' -import {isMobileWeb} from 'platform/detection' +import {isWeb} from 'platform/detection' // 1 is lightest, 2 is light, 3 is mid, 4 is dark, 5 is darkest export const colors = { @@ -175,7 +175,7 @@ export const s = StyleSheet.create({ // dimensions w100pct: {width: '100%'}, h100pct: {height: '100%'}, - hContentRegion: isMobileWeb ? {flex: 1} : {height: '100%'}, + hContentRegion: isWeb ? {minHeight: '100%'} : {height: '100%'}, window: { width: Dimensions.get('window').width, height: Dimensions.get('window').height, diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx index 49f2809819..9595e77e5e 100644 --- a/src/view/com/feeds/FeedPage.tsx +++ b/src/view/com/feeds/FeedPage.tsx @@ -210,18 +210,9 @@ function useHeaderOffset() { const {isDesktop, isTablet} = useWebMediaQueries() const {fontScale} = useWindowDimensions() const {hasSession} = useSession() - - if (isDesktop) { + if (isDesktop || isTablet) { return 0 } - if (isTablet) { - if (hasSession) { - return 50 - } else { - return 0 - } - } - if (hasSession) { const navBarPad = 16 const navBarText = 21 * fontScale diff --git a/src/view/com/pager/FeedsTabBar.web.tsx b/src/view/com/pager/FeedsTabBar.web.tsx index 82cff5463b..385da55441 100644 --- a/src/view/com/pager/FeedsTabBar.web.tsx +++ b/src/view/com/pager/FeedsTabBar.web.tsx @@ -135,7 +135,7 @@ function FeedsTabBarTablet( const styles = StyleSheet.create({ tabBar: { // @ts-ignore Web only - position: 'fixed', + position: 'sticky', zIndex: 1, // @ts-ignore Web only -prf left: 'calc(50% - 300px)',