更新用户资料Banner图片显示逻辑
This commit is contained in:
@@ -55,7 +55,12 @@ data class AccountProfile(
|
|||||||
bio = bio,
|
bio = bio,
|
||||||
country = "Worldwide",
|
country = "Worldwide",
|
||||||
isFollowing = isFollowing,
|
isFollowing = isFollowing,
|
||||||
banner = "${ApiClient.BASE_SERVER}$banner"
|
banner = banner.let {
|
||||||
|
if (!it.isNullOrEmpty()) {
|
||||||
|
return@let "${ApiClient.BASE_SERVER}$it"
|
||||||
|
}
|
||||||
|
null
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,13 +103,16 @@ fun ProfilePage() {
|
|||||||
contentScale = ContentScale.Crop
|
contentScale = ContentScale.Crop
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Box(
|
Image(
|
||||||
|
painter = painterResource(id = R.drawable.rider_pro_moment_demo_2),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(400.dp)
|
.height(400.dp),
|
||||||
.background(Color.Gray)
|
contentDescription = "",
|
||||||
|
contentScale = ContentScale.Crop
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.TopEnd)
|
.align(Alignment.TopEnd)
|
||||||
|
|||||||
Reference in New Issue
Block a user