From 8eb37f9864dd7e5a7997c8fb1af6afec165cf086 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 10 Mar 2023 10:35:07 -0500 Subject: [PATCH] Using full banners on User Profile pages and Drawer Fixes: https://github.com/vitorpamplona/amethyst/issues/247 --- .../vitorpamplona/amethyst/ui/navigation/DrawerContent.kt | 5 +++-- .../amethyst/ui/screen/loggedIn/ProfileScreen.kt | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/DrawerContent.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/DrawerContent.kt index fe8d41930..9ac1cb2c4 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/DrawerContent.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/DrawerContent.kt @@ -43,6 +43,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController import androidx.navigation.NavHostController +import coil.compose.AsyncImage import com.vitorpamplona.amethyst.BuildConfig import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.RoboHashCache @@ -114,8 +115,8 @@ fun ProfileContent(baseAccountUser: User, modifier: Modifier = Modifier, scaffol Box { val banner = accountUser.info?.banner if (banner != null && banner.isNotBlank()) { - AsyncImageProxy( - model = ResizeImage(banner, 150.dp), + AsyncImage( + model = banner, contentDescription = stringResource(id = R.string.profile_image), contentScale = ContentScale.FillWidth, modifier = Modifier diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt index 9de2a4381..198b6c5ca 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt @@ -62,7 +62,6 @@ import com.vitorpamplona.amethyst.service.model.BadgeProfilesEvent import com.vitorpamplona.amethyst.service.model.IdentityClaim import com.vitorpamplona.amethyst.service.model.ReportEvent import com.vitorpamplona.amethyst.ui.actions.NewUserMetadataView -import com.vitorpamplona.amethyst.ui.components.AsyncImageProxy import com.vitorpamplona.amethyst.ui.components.DisplayNip05ProfileStatus import com.vitorpamplona.amethyst.ui.components.InvoiceRequest import com.vitorpamplona.amethyst.ui.components.ResizeImage @@ -623,8 +622,8 @@ private fun DrawBanner(baseUser: User) { var zoomImageDialogOpen by remember { mutableStateOf(false) } if (!banner.isNullOrBlank()) { - AsyncImageProxy( - model = ResizeImage(banner, 125.dp), + AsyncImage( + model = banner, contentDescription = stringResource(id = R.string.profile_image), contentScale = ContentScale.FillWidth, modifier = Modifier