mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-10 06:26:55 +00:00
bfc111cc61
The chat composer's text field reserved 50dp on the wrong horizontal side when an RTL message was typed under an LTR system locale: BiDi auto-detection right-aligned the text onto the BottomEnd edge where the send button sits, hiding the first characters as they were typed. The padding was originally written inside the CompositionLocalProvider( LocalLayoutDirection provides Rtl) scope (#4675), where start resolved to the right edge for RTL paragraphs. The "edge to edge design" refactor (#5051) lifted the modifier out of that scope onto the outer BasicTextField, so start began resolving against the global LTR direction and the reservation drifted to the left. Always reserve on the global end - the same side Alignment.BottomEnd in SendMsgView resolves to - so the reservation tracks the send button regardless of locale or typed-text direction. Behavior is byte-identical for LTR text and for any RTL-locale combination; only the buggy "RTL text + LTR system locale" pair changes.