@@ -31,7 +31,7 @@ import { canSnooze } from "@t3tools/client-runtime/state/thread-settled";
3131import { threadChipCopyTarget } from "@t3tools/client-runtime/thread-reference" ;
3232import type { MenuAction } from "@react-native-menu/menu" ;
3333import { memo , useCallback , useMemo , useState , type ComponentProps } from "react" ;
34- import { Pressable , useWindowDimensions , View , type TextStyle } from "react-native" ;
34+ import { Platform , Pressable , useWindowDimensions , View , type TextStyle } from "react-native" ;
3535import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable" ;
3636
3737import type { ThreadListProvider } from "../../state/thread-list-environments" ;
@@ -91,6 +91,14 @@ function textDirectionStyle(text: string) {
9191 } satisfies TextStyle ;
9292}
9393
94+ function directionalTitle ( text : string ) {
95+ const direction = textDirection ( text ) ;
96+ // Android ignores writingDirection; a render-only mark sets its first-strong paragraph direction.
97+ return Platform . OS === "android" && direction
98+ ? `${ direction === "rtl" ? "\u200f" : "\u200e" } ${ text } `
99+ : text ;
100+ }
101+
94102interface StatusLabel {
95103 readonly label : string ;
96104 readonly icon : AppSymbolName ;
@@ -476,7 +484,7 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
476484 numberOfLines = { 1 }
477485 style = { textDirectionStyle ( pendingTask . title ) }
478486 >
479- { pendingTask . title }
487+ { directionalTitle ( pendingTask . title ) }
480488 </ Text >
481489 { branch || props . environmentLabel ? (
482490 < View className = "mt-1 flex-row items-center gap-1" >
@@ -1093,7 +1101,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
10931101 numberOfLines = { 2 }
10941102 style = { textDirectionStyle ( thread . title ) }
10951103 >
1096- { thread . title }
1104+ { directionalTitle ( thread . title ) }
10971105 </ Text >
10981106 < View className = "flex-row items-center gap-1.5" style = { { minHeight : titleLineHeight } } >
10991107 { props . hasQueuedMessages ? < QueuedMessageIcon selected = { selected } /> : null }
@@ -1385,7 +1393,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
13851393 numberOfLines = { 1 }
13861394 style = { textDirectionStyle ( thread . title ) }
13871395 >
1388- { thread . title }
1396+ { directionalTitle ( thread . title ) }
13891397 </ Text >
13901398 { props . searchMatch ? (
13911399 < ThreadSearchMatchExcerpt
0 commit comments