File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
authenticator/src/main/java/com/amplifyframework/ui/authenticator/strings Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import android.annotation.SuppressLint
1919import androidx.compose.runtime.Composable
2020import androidx.compose.runtime.ReadOnlyComposable
2121import androidx.compose.ui.platform.LocalContext
22+ import androidx.compose.ui.platform.LocalResources
2223import androidx.compose.ui.res.pluralStringResource
2324import androidx.compose.ui.res.stringResource
2425import com.amplifyframework.auth.AuthException
@@ -143,7 +144,7 @@ internal open class StringResolver {
143144 // Check if the customer application has defined a specific string for this Exception type. If not, return
144145 // the generic error message.
145146 val resourceName = error.toResourceName()
146- val resourceId = context.resources .getIdentifier(resourceName, " string" , context.packageName)
147+ val resourceId = LocalResources .current .getIdentifier(resourceName, " string" , context.packageName)
147148 val message = if (resourceId != 0 ) stringResource(resourceId) else null
148149 message ? : stringResource(R .string.amplify_ui_authenticator_error_unknown)
149150 }
You can’t perform that action at this time.
0 commit comments