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