Skip to content

fix(resources): read Compose strings through the Compose loader on Android - #1911

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/activity-titles-release
Oct 30, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/activity-titles-release

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Activity feed rows with a known counterparty show no title in release builds: "Sent to X", "Received from X", tips, boosts and converts all render blank. Rows that use the server text verbatim ("Cancelled", "Purchased") are fine, which is why it looked limited to payment requests.

#1894 moved the transaction-history strings from R.string to Res.string, and AndroidResources.getString(StringResource) resolved them back to R by name with getIdentifier. With no id references left, the release resource shrinker removes all 36 strings in that module. mapping/release/resources.txt reports string:title_activity_sentTo ... is not reachable, and the strings are absent from the APK's resource table. getIdentifier then returns null and the helper returns "". Besides the feed titles, the transaction-details titles, subtitles ("In person", "with X", "for X") and status labels go blank too.

This reads the string with Compose's getString, as the desktop ComposeResourceHelper already does. The module's composeResources .cvr file ships in the release APK, and the shrinker doesn't touch assets. In a release build from this branch, it contains title_activity_sentTo → Sent to %1$s.

ResourceHelperStringResourceTest couldn't catch this: Robolectric runs against unshrunk resources, and CI only builds debug. The same gap let #1908 through.

…droid

#1894 moved the transaction-history titles from R.string to Res.string,
and AndroidResources resolved a StringResource back to R by name with
getIdentifier. Nothing references those strings by id anymore, so the
release resource shrinker strips all 36 of them (resources.txt:
"string:title_activity_sentTo ... is not reachable") and the lookup
returns "". Feed rows with a resolved counterparty ("Sent to X",
"Received from X", tips, boosts, converts) render with no title, as do
the transaction-details titles, subtitles and status labels.

Read the string with Compose's getString instead, as the desktop
ComposeResourceHelper already does. The composeResources .cvr assets
ship in the release APK and the shrinker leaves them alone.
@bmc08gt bmc08gt self-assigned this Oct 30, 2026
@github-actions github-actions Bot added type: fix Bug fix area: ui Compose UI, theme, components, resources and removed type: fix Bug fix labels Oct 30, 2026
@bmc08gt
bmc08gt merged commit bc66e97 into code/cash Oct 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant