Tune spacing for demo mode
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
InteractionManager,
|
||||
StyleProp,
|
||||
type StyleProp,
|
||||
StyleSheet,
|
||||
View,
|
||||
ViewStyle,
|
||||
type ViewStyle,
|
||||
} from 'react-native'
|
||||
import {MeasuredDimensions, runOnJS, runOnUI} from 'react-native-reanimated'
|
||||
import {type MeasuredDimensions, runOnJS, runOnUI} from 'react-native-reanimated'
|
||||
import {Image} from 'expo-image'
|
||||
import {
|
||||
AppBskyEmbedExternal,
|
||||
@@ -18,10 +18,10 @@ import {
|
||||
AppBskyGraphDefs,
|
||||
moderateFeedGenerator,
|
||||
moderateUserList,
|
||||
ModerationDecision,
|
||||
type ModerationDecision,
|
||||
} from '@atproto/api'
|
||||
|
||||
import {HandleRef, measureHandle} from '#/lib/hooks/useHandleRef'
|
||||
import {type HandleRef, measureHandle} from '#/lib/hooks/useHandleRef'
|
||||
import {usePalette} from '#/lib/hooks/usePalette'
|
||||
import {useLightboxControls} from '#/state/lightbox'
|
||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||
@@ -29,8 +29,9 @@ import {FeedSourceCard} from '#/view/com/feeds/FeedSourceCard'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import * as ListCard from '#/components/ListCard'
|
||||
import {Embed as StarterPackCard} from '#/components/StarterPack/StarterPackCard'
|
||||
import {useDemoMode} from '#/storage/hooks/demo-mode'
|
||||
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
||||
import {Dimensions} from '../../lightbox/ImageViewing/@types'
|
||||
import {type Dimensions} from '../../lightbox/ImageViewing/@types'
|
||||
import {AutoSizedImage} from '../images/AutoSizedImage'
|
||||
import {ImageLayoutGrid} from '../images/ImageLayoutGrid'
|
||||
import {ExternalLinkEmbed} from './ExternalLinkEmbed'
|
||||
@@ -64,6 +65,7 @@ export function PostEmbeds({
|
||||
viewContext?: PostEmbedViewContext
|
||||
}) {
|
||||
const {openLightbox} = useLightboxControls()
|
||||
const [demoMode] = useDemoMode()
|
||||
|
||||
// quote post with media
|
||||
// =
|
||||
@@ -178,7 +180,13 @@ export function PostEmbeds({
|
||||
const image = images[0]
|
||||
return (
|
||||
<ContentHider modui={moderation?.ui('contentMedia')}>
|
||||
<View style={[a.mt_sm, style]}>
|
||||
<View
|
||||
style={[
|
||||
a.mt_sm,
|
||||
style,
|
||||
demoMode && a.mt_md,
|
||||
demoMode && a.mb_xs,
|
||||
]}>
|
||||
<AutoSizedImage
|
||||
crop={
|
||||
viewContext === PostEmbedViewContext.ThreadHighlighted
|
||||
|
||||
Reference in New Issue
Block a user