Using full banners on User Profile pages and Drawer

Fixes: https://github.com/vitorpamplona/amethyst/issues/247
This commit is contained in:
Vitor Pamplona
2023-03-10 10:35:07 -05:00
parent 5a45c6d25f
commit 8eb37f9864
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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