From 54d0ec806d49a6958a200156d1edab70c3f64a0c Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Sat, 7 Dec 2024 15:10:24 +0100 Subject: [PATCH] Add content description to recommended apps icons --- .../amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt index 0712b337f..cd110952d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt @@ -1300,6 +1300,7 @@ private fun WatchApp( val appState by baseApp.live().metadata.observeAsState() var appLogo by remember(baseApp) { mutableStateOf(null) } + var appName by remember(baseApp) { mutableStateOf(null) } LaunchedEffect(key1 = appState) { withContext(Dispatchers.Default) { @@ -1308,6 +1309,12 @@ private fun WatchApp( if (newAppLogo != appLogo) { appLogo = newAppLogo } + + val newAppName = + (appState?.note?.event as? AppDefinitionEvent)?.appMetaData()?.name?.ifBlank { null } + if (newAppName != appName) { + appName = newAppName + } } } @@ -1321,7 +1328,7 @@ private fun WatchApp( ) { AsyncImage( model = appLogo, - contentDescription = null, + contentDescription = appName, modifier = remember { Modifier