mattermost-mobile-upstream/app
Eva Sarafianou beda8d78ba
Route through usePropsFromParams for remaining stragglers (#9949) (#9950)
Four route files were still consuming useLocalSearchParams directly,
bypassing the safeParseJSON decode that every other route already
uses via usePropsFromParams. Combined with propsToParams unconditionally
JSON.stringify'ing every prop (#9931), that means their string params
arrived with literal quote characters embedded (e.g. rootId "abc123"
-> `"abc123"`).

Impact:
- thread.tsx: rootId doesn't match any post in the DB, rootPost stays
  undefined, ThreadContent never renders. The user sees a blank thread
  screen with subtitle `in "channel name"` (visible quote characters).
- code.tsx: code param is rendered verbatim by the highlighter with
  outer quotes and escaped inner quotes/backslashes. The MM-69330
  workaround (bypassing the hook to preserve string type) is obsolete
  now that propsToParams always JSON-encodes: safeParseJSON('"42"')
  returns the string '42', not the number 42.
- about.tsx / settings_display_timezone_select.tsx: header text and
  timezone identifier arrive with extra quotes.

Migrating all four to usePropsFromParams closes the symmetry: every
param is JSON-encoded on send and JSON-decoded on receive.

Also updates code.test.tsx to feed the route JSON-encoded params, so
the MM-69330 regression coverage still exercises the exact scenario
seen in production.


(cherry picked from commit 9a40cad748)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 20:10:00 +03:00
..
actions fix critical crashes on Android (#9871) (#9874) 2026-06-23 03:03:10 +08:00
client Receive Mattermost Calls through iOS native incoming-call UI (#9780) 2026-06-16 12:08:14 -03:00
components Fix crash on android caused by keyboard controller (#9902) (#9913) 2026-07-07 10:51:03 +03:00
constants Remove Legacy Interactive Dialog code (#9770) (#9857) 2026-06-18 09:12:04 +03:00
context Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
database fix critical crashes on Android (#9871) (#9874) 2026-06-23 03:03:10 +08:00
helpers Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
hooks fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
i18n Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
init [MM-69124] Remove temporary device-verification logs (#9860) (#9885) 2026-06-23 23:39:17 +02:00
keyboard resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
managers Receive Mattermost Calls through iOS native incoming-call UI (#9780) 2026-06-16 12:08:14 -03:00
products fixes audio devices not showing on android audio selector during a call (#9905) (#9906) 2026-07-03 08:10:33 +03:00
queries fix critical crashes on Android (#9871) (#9874) 2026-06-23 03:03:10 +08:00
routes Route through usePropsFromParams for remaining stragglers (#9949) (#9950) 2026-07-18 20:10:00 +03:00
screens Fix passing number strings through screen params (#9931) (#9935) 2026-07-17 08:00:48 +03:00
store Receive Mattermost Calls through iOS native incoming-call UI (#9780) 2026-06-16 12:08:14 -03:00
utils Fix passing number strings through screen params (#9931) (#9935) 2026-07-17 08:00:48 +03:00