Lighten blue (link) text for dim and dark themes (#11164)
This commit is contained in:
@@ -6,10 +6,9 @@ import {
|
||||
useState,
|
||||
} from 'react'
|
||||
import {
|
||||
type NativeSyntheticEvent,
|
||||
Text as RNText,
|
||||
TextInput as RNTextInput,
|
||||
type TextInputSelectionChangeEventData,
|
||||
type TextInputSelectionChangeEvent,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import {type PasteEventPayload, TextInputWrapper} from 'expo-paste-input'
|
||||
@@ -141,7 +140,7 @@ export function TextInput({
|
||||
)
|
||||
|
||||
const onSelectionChange = useCallback(
|
||||
(evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => {
|
||||
(evt: TextInputSelectionChangeEvent) => {
|
||||
// NOTE we track the input selection using a ref to avoid excessive renders -prf
|
||||
textInputSelection.current = evt.nativeEvent.selection
|
||||
},
|
||||
@@ -150,7 +149,7 @@ export function TextInput({
|
||||
|
||||
const onSelectAutocompleteItem = useCallback(
|
||||
(item: string) => {
|
||||
onChangeText(
|
||||
void onChangeText(
|
||||
insertMentionAt(
|
||||
richtext.text,
|
||||
textInputSelection.current?.start || 0,
|
||||
@@ -201,7 +200,9 @@ export function TextInput({
|
||||
style={[
|
||||
inputTextStyle,
|
||||
{
|
||||
color: segment.facet ? t.palette.primary_500 : t.atoms.text.color,
|
||||
color: segment.facet
|
||||
? t.atoms.text_link.color
|
||||
: t.atoms.text.color,
|
||||
marginTop: -1,
|
||||
},
|
||||
]}>
|
||||
@@ -217,7 +218,7 @@ export function TextInput({
|
||||
<RNTextInput
|
||||
testID="composerTextInput"
|
||||
ref={textInput}
|
||||
onChangeText={onChangeText}
|
||||
onChangeText={(newText: string) => void onChangeText(newText)}
|
||||
onSelectionChange={onSelectionChange}
|
||||
placeholder={placeholder}
|
||||
placeholderTextColor={t.atoms.text_contrast_low.color}
|
||||
|
||||
@@ -58,7 +58,8 @@ export function ViewFullThread({uri}: {uri: string}) {
|
||||
<Text
|
||||
style={[
|
||||
a.text_md,
|
||||
{color: t.palette.primary_500, paddingTop: 18, paddingBottom: 4},
|
||||
t.atoms.text_link,
|
||||
{paddingTop: 18, paddingBottom: 4},
|
||||
]}>
|
||||
{/* HACKFIX: Trans isn't working after SDK 53 upgrade -sfn */}
|
||||
{l`View full thread`}
|
||||
|
||||
Reference in New Issue
Block a user