Bluesky app fork with some witchin' additions 💫

Go full width on native and mobile web (#5184)

authored by

Eric Bailey and committed by
GitHub
64b50ba6 b90cd683

+8 -3
+8 -3
src/view/com/util/images/AutoSizedImage.tsx
··· 7 7 8 8 import * as imageSizes from '#/lib/media/image-sizes' 9 9 import {Dimensions} from '#/lib/media/types' 10 + import {isNative} from '#/platform/detection' 10 11 import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge' 11 - import {atoms as a, useTheme} from '#/alf' 12 + import {atoms as a, useBreakpoints, useTheme} from '#/alf' 12 13 import {Crop_Stroke2_Corner0_Rounded as Crop} from '#/components/icons/Crop' 13 14 import {Text} from '#/components/Typography' 14 15 ··· 65 66 children: React.ReactNode 66 67 }) { 67 68 const t = useTheme() 69 + const {gtMobile} = useBreakpoints() 68 70 /** 69 71 * Computed as a % value to apply as `paddingTop` 70 72 */ 71 73 const outerAspectRatio = React.useMemo<DimensionValue>(() => { 72 74 // capped to square or shorter 73 - const ratio = Math.min(1 / aspectRatio, 1) 75 + const ratio = 76 + isNative || !gtMobile 77 + ? Math.min(1 / aspectRatio, 1.5) 78 + : Math.min(1 / aspectRatio, 1) 74 79 return `${ratio * 100}%` 75 - }, [aspectRatio]) 80 + }, [aspectRatio, gtMobile]) 76 81 77 82 return ( 78 83 <View style={[a.w_full]}>