Delete "non-standard" styles from pal (#10279)

This commit is contained in:
Samuel Newman
2026-04-20 11:34:25 -07:00
committed by GitHub
parent ae0c2e8697
commit 014ffac903
8 changed files with 88 additions and 138 deletions
+18 -8
View File
@@ -12,10 +12,8 @@ import {useQueryClient} from '@tanstack/react-query'
import {MAX_POST_LINES} from '#/lib/constants'
import {useOpenComposer} from '#/lib/hooks/useOpenComposer'
import {usePalette} from '#/lib/hooks/usePalette'
import {makeProfileLink} from '#/lib/routes/links'
import {countLines} from '#/lib/strings/helpers'
import {colors} from '#/lib/styles'
import {
POST_TOMBSTONE,
type Shadow,
@@ -26,7 +24,7 @@ import {unstableCacheProfileView} from '#/state/queries/profile'
import {Link} from '#/view/com/util/Link'
import {PostMeta} from '#/view/com/util/PostMeta'
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a} from '#/alf'
import {atoms as a, select, useTheme} from '#/alf'
import {
GalleryBleed,
maybeApplyGalleryOffsetStyles,
@@ -119,7 +117,7 @@ function PostInner({
onBeforePress?: () => void
}) {
const queryClient = useQueryClient()
const pal = usePalette('default')
const t = useTheme()
const {openComposer} = useOpenComposer()
const [limitLines, setLimitLines] = useState(
() => countLines(richText?.text) >= MAX_POST_LINES,
@@ -164,8 +162,8 @@ function PostInner({
href={itemHref}
style={[
styles.outer,
pal.border,
!hideTopBorder && {borderTopWidth: StyleSheet.hairlineWidth},
t.atoms.border_contrast_low,
!hideTopBorder && a.border_t,
style,
]}
onBeforePress={onBeforePress}
@@ -176,7 +174,20 @@ function PostInner({
setHover(false)
}}>
<SubtleHover hover={hover} />
{showReplyLine && <View style={styles.replyLine} />}
{showReplyLine && (
<View
style={[
styles.replyLine,
{
backgroundColor: select(t.name, {
light: t.palette.contrast_100,
dim: t.palette.contrast_200,
dark: t.palette.contrast_200,
}),
},
]}
/>
)}
<View style={styles.layout}>
<View style={styles.layoutAvi}>
<PreviewableUserAvatar
@@ -290,7 +301,6 @@ const styles = StyleSheet.create({
top: 70,
bottom: 0,
borderLeftWidth: 2,
borderLeftColor: colors.gray2,
},
contentHider: {
marginBottom: 2,