From 7f4f3cab3b0784d7b8aa2741e701e66836bf9683 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 01:32:12 +0000 Subject: [PATCH] fix: read backup-conflict labels through LocalResources Android lint's LocalContextGetResourceValueCall fails the build on rememberPresentation: context.getString is not configuration-aware. LocalResources.current invalidates on configuration changes, so the remembered labels follow a locale change. main fails the same lint. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0168wY9t7i9NC5u3svyMxEz6 --- .../screen/loggedIn/backups/BackupConflictPresentation.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/backups/BackupConflictPresentation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/backups/BackupConflictPresentation.kt index 6c7772ba36..58195a5d31 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/backups/BackupConflictPresentation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/backups/BackupConflictPresentation.kt @@ -23,7 +23,7 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn.backups import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.runtime.remember -import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalResources import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.model.backups.BackupEventType import com.vitorpamplona.quartz.concord.cord02Community.ConcordCommunityListDiff @@ -242,8 +242,8 @@ private fun arrow( */ @Composable fun rememberPresentation(diff: EventDiff): DiffPresentation { - val context = LocalContext.current - return remember(diff, context) { presentationOf(diff) { context.getString(it) } } + val resources = LocalResources.current + return remember(diff, resources) { presentationOf(diff) { resources.getString(it) } } } /** Turns each event's own diff into typed, labelled groups. [str] resolves the labels. */