mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 19:53:50 +02:00
Forces image size in profile pictures to reduce calculations before resizing the downloaded image.
This commit is contained in:
@@ -683,7 +683,8 @@ fun NoteAuthorPicture(
|
|||||||
robot = "authornotfound",
|
robot = "authornotfound",
|
||||||
contentDescription = stringResource(R.string.unknown_author),
|
contentDescription = stringResource(R.string.unknown_author),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxSize(1f)
|
.width(size)
|
||||||
|
.height(size)
|
||||||
.clip(shape = CircleShape)
|
.clip(shape = CircleShape)
|
||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.background)
|
||||||
)
|
)
|
||||||
@@ -729,7 +730,8 @@ fun UserPicture(
|
|||||||
model = ResizeImage(user.profilePicture(), size),
|
model = ResizeImage(user.profilePicture(), size),
|
||||||
contentDescription = stringResource(id = R.string.profile_image),
|
contentDescription = stringResource(id = R.string.profile_image),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxSize(1f)
|
.width(size)
|
||||||
|
.height(size)
|
||||||
.clip(shape = CircleShape)
|
.clip(shape = CircleShape)
|
||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.background)
|
||||||
.run {
|
.run {
|
||||||
|
@@ -585,7 +585,8 @@ fun BadgeThumb(
|
|||||||
robot = "authornotfound",
|
robot = "authornotfound",
|
||||||
contentDescription = stringResource(R.string.unknown_author),
|
contentDescription = stringResource(R.string.unknown_author),
|
||||||
modifier = pictureModifier
|
modifier = pictureModifier
|
||||||
.fillMaxSize(1f)
|
.width(size)
|
||||||
|
.height(size)
|
||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.background)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -594,7 +595,8 @@ fun BadgeThumb(
|
|||||||
model = image,
|
model = image,
|
||||||
contentDescription = stringResource(id = R.string.profile_image),
|
contentDescription = stringResource(id = R.string.profile_image),
|
||||||
modifier = pictureModifier
|
modifier = pictureModifier
|
||||||
.fillMaxSize(1f)
|
.width(size)
|
||||||
|
.height(size)
|
||||||
.clip(shape = CircleShape)
|
.clip(shape = CircleShape)
|
||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.background)
|
||||||
.run {
|
.run {
|
||||||
|
Reference in New Issue
Block a user