mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Composer - fix divider when replying to someone (#4279)

* move replyto border to beneath

* use hairline width for consistency

* fix border colors

authored by samuel.fm and committed by

GitHub a72f55a1 cd497a39

+13 -7
+3 -1
src/view/com/composer/Composer.tsx
··· 183 183 [0, 1], 184 184 [ 185 185 'transparent', 186 - isWeb ? t.palette.contrast_100 : t.palette.contrast_400, 186 + isWeb 187 + ? t.atoms.border_contrast_low.borderColor 188 + : t.atoms.border_contrast_high.borderColor, 187 189 ], 188 190 ), 189 191 }
+10 -6
src/view/com/composer/ComposerReplyTo.tsx
··· 10 10 import {msg} from '@lingui/macro' 11 11 import {useLingui} from '@lingui/react' 12 12 13 - import {usePalette} from 'lib/hooks/usePalette' 13 + import {isWeb} from '#/platform/detection' 14 14 import {sanitizeDisplayName} from 'lib/strings/display-names' 15 15 import {sanitizeHandle} from 'lib/strings/handles' 16 16 import {ComposerOptsPostRef} from 'state/shell/composer' 17 17 import {QuoteEmbed} from 'view/com/util/post-embeds/QuoteEmbed' 18 18 import {Text} from 'view/com/util/text/Text' 19 19 import {PreviewableUserAvatar} from 'view/com/util/UserAvatar' 20 + import {useTheme} from '#/alf' 20 21 21 22 export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) { 22 - const pal = usePalette('default') 23 + const t = useTheme() 23 24 const {_} = useLingui() 24 25 const {embed} = replyTo 25 26 ··· 75 76 76 77 return ( 77 78 <Pressable 78 - style={[pal.border, styles.replyToLayout]} 79 + style={[ 80 + isWeb ? t.atoms.border_contrast_low : t.atoms.border_contrast_high, 81 + styles.replyToLayout, 82 + ]} 79 83 onPress={onPress} 80 84 accessibilityRole="button" 81 85 accessibilityLabel={_( ··· 91 95 type={replyTo.author.associated?.labeler ? 'labeler' : 'user'} 92 96 /> 93 97 <View style={styles.replyToPost}> 94 - <Text type="xl-medium" style={[pal.text]}> 98 + <Text type="xl-medium" style={t.atoms.text}> 95 99 {sanitizeDisplayName( 96 100 replyTo.author.displayName || sanitizeHandle(replyTo.author.handle), 97 101 )} ··· 100 104 <View style={styles.replyToText}> 101 105 <Text 102 106 type="post-text" 103 - style={pal.text} 107 + style={t.atoms.text} 104 108 numberOfLines={!showFull ? 6 : undefined}> 105 109 {replyTo.text} 106 110 </Text> ··· 218 222 replyToLayout: { 219 223 flexDirection: 'row', 220 224 alignItems: 'flex-start', 221 - borderTopWidth: 1, 225 + borderBottomWidth: StyleSheet.hairlineWidth, 222 226 paddingTop: 16, 223 227 paddingBottom: 16, 224 228 },