diff --git a/src/lib/themes.ts b/src/lib/themes.ts index 4256bb7a61..7564edeb14 100644 --- a/src/lib/themes.ts +++ b/src/lib/themes.ts @@ -21,8 +21,6 @@ export const defaultTheme: Theme = { icon: lightPalette.contrast_500, // non-standard - replyLine: lightPalette.contrast_100, - replyLineDot: lightPalette.contrast_200, postCtrl: lightPalette.contrast_500, brandText: lightPalette.primary_500, emptyStateIcon: lightPalette.contrast_300, @@ -304,8 +302,6 @@ export const darkTheme: Theme = { icon: darkPalette.contrast_500, // non-standard - replyLine: darkPalette.contrast_200, - replyLineDot: darkPalette.contrast_200, postCtrl: darkPalette.contrast_500, brandText: darkPalette.primary_500, emptyStateIcon: darkPalette.contrast_300, @@ -350,8 +346,6 @@ export const dimTheme: Theme = { icon: dimPalette.contrast_500, // non-standard - replyLine: dimPalette.contrast_200, - replyLineDot: dimPalette.contrast_200, postCtrl: dimPalette.contrast_500, brandText: dimPalette.primary_500, emptyStateIcon: dimPalette.contrast_300, diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 052de3bab3..62e7cb2aae 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -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) }}> - {showReplyLine && } + {showReplyLine && ( + + )} { const urip = new AtUri(uri) return makeProfileLink({did: urip.hostname, handle: ''}, 'post', urip.rkey) }, [uri]) - const {_} = useLingui() + const {t: l} = useLingui() return ( - - - - + {({hovered}) => ( + <> + - - - - - - - - {/* HACKFIX: Trans isn't working after SDK 53 upgrade -sfn */} - {_(msg`View full thread`)} - + + + + + + + + + + {/* HACKFIX: Trans isn't working after SDK 53 upgrade -sfn */} + {l`View full thread`} + + + )} ) } - -const styles = StyleSheet.create({ - viewFullThread: { - flexDirection: 'row', - gap: 10, - paddingLeft: 18, - }, - viewFullThreadDots: { - width: 42, - alignItems: 'center', - }, -})