mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-09 23:11:52 +00:00
8c9c6471a7
* desktop: fix RTL text rendering under the send button (#4137) 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. * desktop: minimise diff of RTL fix to 2 lines (#4137) The previous commit (bfc111cc6) renamed/removed several helper locals and rewrote the comment block alongside the behaviour change. The behaviour-changing part is just two lines: making startPadding always 0.dp and endPadding equal to startEndPadding. Restore the surrounding code (startEndPadding name, startPadding decl, PaddingValues argument, .padding modifier, and the original two-line comment) to its master form so the PR's only effect on master is the two-line fix. Behaviour: cases 1, 3, 4 of the locale x text matrix are byte-identical to master. Only case 2 (LTR locale + RTL text) flips the reservation from the wrong side to the correct side. * plans: desktop RTL composer fix (#4137) * plans: align with surgical 2-line fix in PR (#4137)