Tweak padding around posts
This commit is contained in:
@@ -24,7 +24,7 @@ import {unstableCacheProfileView} from '#/state/queries/profile'
|
|||||||
import {Link} from '#/view/com/util/Link'
|
import {Link} from '#/view/com/util/Link'
|
||||||
import {PostMeta} from '#/view/com/util/PostMeta'
|
import {PostMeta} from '#/view/com/util/PostMeta'
|
||||||
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {atoms as a, select, useTheme} from '#/alf'
|
import {atoms as a, select, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {
|
import {
|
||||||
GalleryBleed,
|
GalleryBleed,
|
||||||
maybeApplyGalleryOffsetStyles,
|
maybeApplyGalleryOffsetStyles,
|
||||||
@@ -115,6 +115,7 @@ function PostInner({
|
|||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
onBeforePress?: () => void
|
onBeforePress?: () => void
|
||||||
}) {
|
}) {
|
||||||
|
const {gtMobile} = useBreakpoints()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {openComposer} = useOpenComposer()
|
const {openComposer} = useOpenComposer()
|
||||||
@@ -161,6 +162,9 @@ function PostInner({
|
|||||||
href={itemHref}
|
href={itemHref}
|
||||||
style={[
|
style={[
|
||||||
styles.outer,
|
styles.outer,
|
||||||
|
gtMobile ? a.px_lg : a.px_md,
|
||||||
|
gtMobile ? a.pt_lg : a.pt_md,
|
||||||
|
gtMobile ? a.pb_sm : a.pb_xs,
|
||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
!hideTopBorder && a.border_t,
|
!hideTopBorder && a.border_t,
|
||||||
style,
|
style,
|
||||||
@@ -275,10 +279,6 @@ function PostInner({
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
outer: {
|
outer: {
|
||||||
paddingTop: 10,
|
|
||||||
paddingRight: 15,
|
|
||||||
paddingBottom: 5,
|
|
||||||
paddingLeft: 10,
|
|
||||||
// @ts-ignore web only -prf
|
// @ts-ignore web only -prf
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import {
|
|||||||
import {Link} from '#/view/com/util/Link'
|
import {Link} from '#/view/com/util/Link'
|
||||||
import {PostMeta} from '#/view/com/util/PostMeta'
|
import {PostMeta} from '#/view/com/util/PostMeta'
|
||||||
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {atoms as a, select, useTheme} from '#/alf'
|
import {atoms as a, select, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {
|
import {
|
||||||
GalleryBleed,
|
GalleryBleed,
|
||||||
maybeApplyGalleryOffsetStyles,
|
maybeApplyGalleryOffsetStyles,
|
||||||
@@ -163,6 +163,7 @@ let FeedItemInner = ({
|
|||||||
onShowLess?: (interaction: AppBskyFeedDefs.Interaction) => void
|
onShowLess?: (interaction: AppBskyFeedDefs.Interaction) => void
|
||||||
}): React.ReactNode => {
|
}): React.ReactNode => {
|
||||||
const ax = useAnalytics()
|
const ax = useAnalytics()
|
||||||
|
const {gtMobile} = useBreakpoints()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const {openComposer} = useOpenComposer()
|
const {openComposer} = useOpenComposer()
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
@@ -265,11 +266,15 @@ let FeedItemInner = ({
|
|||||||
|
|
||||||
const outerStyles = [
|
const outerStyles = [
|
||||||
styles.outer,
|
styles.outer,
|
||||||
|
gtMobile ? a.pl_sm : a.pl_xs,
|
||||||
|
gtMobile ? a.pr_lg : a.pr_md,
|
||||||
{
|
{
|
||||||
borderColor: pal.colors.border,
|
borderColor: pal.colors.border,
|
||||||
paddingBottom:
|
paddingBottom:
|
||||||
isThreadLastChild || (!isThreadChild && !isThreadParent)
|
isThreadLastChild || (!isThreadChild && !isThreadParent)
|
||||||
? 8
|
? gtMobile
|
||||||
|
? 14
|
||||||
|
: 10
|
||||||
: undefined,
|
: undefined,
|
||||||
borderTopWidth:
|
borderTopWidth:
|
||||||
hideTopBorder || isThreadChild ? 0 : StyleSheet.hairlineWidth,
|
hideTopBorder || isThreadChild ? 0 : StyleSheet.hairlineWidth,
|
||||||
@@ -358,7 +363,7 @@ let FeedItemInner = ({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.pt_sm, a.flex_shrink]}>
|
<View style={[gtMobile ? a.pt_lg : a.pt_md, a.flex_shrink]}>
|
||||||
{reason && (
|
{reason && (
|
||||||
<PostFeedReason
|
<PostFeedReason
|
||||||
reason={reason}
|
reason={reason}
|
||||||
@@ -542,8 +547,6 @@ PostContent = memo(PostContent)
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
outer: {
|
outer: {
|
||||||
paddingLeft: 10,
|
|
||||||
paddingRight: 15,
|
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
},
|
},
|
||||||
replyLine: {
|
replyLine: {
|
||||||
|
|||||||
Reference in New Issue
Block a user