Files
simplex-chat/apps/multiplatform/common
Narasimha-sc 326c42e3d6 android, desktop: fix several RTL layout issues
Fixes https://github.com/simplex-chat/simplex-chat/issues/5448

The original report documents four user-visible regressions under an RTL
locale (Arabic, Persian, Hebrew): chat bubble tails on the wrong side,
chat header call/menu buttons not mirrored, settings back arrow pointing
the wrong way, and the chat list profile avatar / signal icon laid out
in their LTR positions. This commit addresses all of them and a handful
of related directional-icon mirroring sites discovered during the audit.

- Chat bubble tail direction: chatItemShape now reads layoutDirection
  from the GenericShape lambda and conditions the matrix mirror on
  sent != isRtl, so sent-bubble tails point toward the user's profile
  and received-bubble tails toward the contact's profile under both
  LTR and RTL. The bubble-tail paddings in FramedItemView and ChatView
  already use direction-aware start/end and now align with the
  mirrored shape automatically.

- App-bar slot mirroring: CenteredRowLayout in FramedItemView switches
  from place(...) to placeRelative(...) so the navigation icon and the
  action buttons swap visual sides under RTL. Both the chat header
  (call/menu buttons) and the chat list header (profile avatar, signal
  icon) flow through this layout, so one fix covers both.

- Asymmetric directional drawables: add Modifier.mirrorIfRtl()
  (Modifier.scale(-1f, 1f) when LocalLayoutDirection.current is Rtl)
  and apply it to the back arrow in NavigationButtonBack, every variant
  of the SubscriptionStatusIcon waves, the WhatsNewView pagination
  arrows, the back arrow and submenu chevron in CommandsMenuView, the
  back arrow in OnboardingCards and ImageFullScreenView.desktop, the
  share-profile chevron in NewChatView, and the sent-via-proxy arrow
  in CIMetaView and ChatItemInfoView.

DropdownMenu offsets in ChatView (DpOffset(-width, ...)) are left
unchanged: DropdownMenuPositionProvider already negates the content
offset under RTL, so menus anchor and open correctly once
CenteredRowLayout is fixed.
2026-04-28 15:53:22 +00:00
..