Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Tune spacing for demo mode

+15 -7
+15 -7
src/view/com/util/post-embeds/index.tsx
··· 1 1 import React from 'react' 2 2 import { 3 3 InteractionManager, 4 - StyleProp, 4 + type StyleProp, 5 5 StyleSheet, 6 6 View, 7 - ViewStyle, 7 + type ViewStyle, 8 8 } from 'react-native' 9 - import {MeasuredDimensions, runOnJS, runOnUI} from 'react-native-reanimated' 9 + import {type MeasuredDimensions, runOnJS, runOnUI} from 'react-native-reanimated' 10 10 import {Image} from 'expo-image' 11 11 import { 12 12 AppBskyEmbedExternal, ··· 18 18 AppBskyGraphDefs, 19 19 moderateFeedGenerator, 20 20 moderateUserList, 21 - ModerationDecision, 21 + type ModerationDecision, 22 22 } from '@atproto/api' 23 23 24 - import {HandleRef, measureHandle} from '#/lib/hooks/useHandleRef' 24 + import {type HandleRef, measureHandle} from '#/lib/hooks/useHandleRef' 25 25 import {usePalette} from '#/lib/hooks/usePalette' 26 26 import {useLightboxControls} from '#/state/lightbox' 27 27 import {useModerationOpts} from '#/state/preferences/moderation-opts' ··· 29 29 import {atoms as a, useTheme} from '#/alf' 30 30 import * as ListCard from '#/components/ListCard' 31 31 import {Embed as StarterPackCard} from '#/components/StarterPack/StarterPackCard' 32 + import {useDemoMode} from '#/storage/hooks/demo-mode' 32 33 import {ContentHider} from '../../../../components/moderation/ContentHider' 33 - import {Dimensions} from '../../lightbox/ImageViewing/@types' 34 + import {type Dimensions} from '../../lightbox/ImageViewing/@types' 34 35 import {AutoSizedImage} from '../images/AutoSizedImage' 35 36 import {ImageLayoutGrid} from '../images/ImageLayoutGrid' 36 37 import {ExternalLinkEmbed} from './ExternalLinkEmbed' ··· 64 65 viewContext?: PostEmbedViewContext 65 66 }) { 66 67 const {openLightbox} = useLightboxControls() 68 + const [demoMode] = useDemoMode() 67 69 68 70 // quote post with media 69 71 // = ··· 178 180 const image = images[0] 179 181 return ( 180 182 <ContentHider modui={moderation?.ui('contentMedia')}> 181 - <View style={[a.mt_sm, style]}> 183 + <View 184 + style={[ 185 + a.mt_sm, 186 + style, 187 + demoMode && a.mt_md, 188 + demoMode && a.mb_xs, 189 + ]}> 182 190 <AutoSizedImage 183 191 crop={ 184 192 viewContext === PostEmbedViewContext.ThreadHighlighted