mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 00:53:18 +02:00
Using full banners on User Profile pages and Drawer
Fixes: https://github.com/vitorpamplona/amethyst/issues/247
This commit is contained in:
@@ -43,6 +43,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.NavHostController
|
import androidx.navigation.NavHostController
|
||||||
|
import coil.compose.AsyncImage
|
||||||
import com.vitorpamplona.amethyst.BuildConfig
|
import com.vitorpamplona.amethyst.BuildConfig
|
||||||
import com.vitorpamplona.amethyst.R
|
import com.vitorpamplona.amethyst.R
|
||||||
import com.vitorpamplona.amethyst.RoboHashCache
|
import com.vitorpamplona.amethyst.RoboHashCache
|
||||||
@@ -114,8 +115,8 @@ fun ProfileContent(baseAccountUser: User, modifier: Modifier = Modifier, scaffol
|
|||||||
Box {
|
Box {
|
||||||
val banner = accountUser.info?.banner
|
val banner = accountUser.info?.banner
|
||||||
if (banner != null && banner.isNotBlank()) {
|
if (banner != null && banner.isNotBlank()) {
|
||||||
AsyncImageProxy(
|
AsyncImage(
|
||||||
model = ResizeImage(banner, 150.dp),
|
model = banner,
|
||||||
contentDescription = stringResource(id = R.string.profile_image),
|
contentDescription = stringResource(id = R.string.profile_image),
|
||||||
contentScale = ContentScale.FillWidth,
|
contentScale = ContentScale.FillWidth,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@@ -62,7 +62,6 @@ import com.vitorpamplona.amethyst.service.model.BadgeProfilesEvent
|
|||||||
import com.vitorpamplona.amethyst.service.model.IdentityClaim
|
import com.vitorpamplona.amethyst.service.model.IdentityClaim
|
||||||
import com.vitorpamplona.amethyst.service.model.ReportEvent
|
import com.vitorpamplona.amethyst.service.model.ReportEvent
|
||||||
import com.vitorpamplona.amethyst.ui.actions.NewUserMetadataView
|
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.DisplayNip05ProfileStatus
|
||||||
import com.vitorpamplona.amethyst.ui.components.InvoiceRequest
|
import com.vitorpamplona.amethyst.ui.components.InvoiceRequest
|
||||||
import com.vitorpamplona.amethyst.ui.components.ResizeImage
|
import com.vitorpamplona.amethyst.ui.components.ResizeImage
|
||||||
@@ -623,8 +622,8 @@ private fun DrawBanner(baseUser: User) {
|
|||||||
var zoomImageDialogOpen by remember { mutableStateOf(false) }
|
var zoomImageDialogOpen by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
if (!banner.isNullOrBlank()) {
|
if (!banner.isNullOrBlank()) {
|
||||||
AsyncImageProxy(
|
AsyncImage(
|
||||||
model = ResizeImage(banner, 125.dp),
|
model = banner,
|
||||||
contentDescription = stringResource(id = R.string.profile_image),
|
contentDescription = stringResource(id = R.string.profile_image),
|
||||||
contentScale = ContentScale.FillWidth,
|
contentScale = ContentScale.FillWidth,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
Reference in New Issue
Block a user