refactor: profile pictures kinda broken

This commit is contained in:
0x330a 2023-07-12 15:40:14 +10:00
parent c7afe68bec
commit f650467105
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C
2 changed files with 5 additions and 1 deletions

View File

@ -129,19 +129,21 @@ class ProfilePictureView @JvmOverloads constructor(
} else if (recipient.isOpenGroupRecipient && recipient.groupAvatarId == null) {
glide.clear(imageView)
glide.load(unknownOpenGroupDrawable)
.centerCrop()
.circleCrop()
.into(imageView)
} else {
glide.clear(imageView)
glide.load(placeholder)
.placeholder(unknownRecipientDrawable)
.centerCrop()
.circleCrop()
.diskCacheStrategy(DiskCacheStrategy.NONE).circleCrop().into(imageView)
}
profilePicturesCache[publicKey] = recipient.profileAvatar
} else {
glide.load(unknownRecipientDrawable)
.circleCrop()
.centerCrop()
.into(imageView)
}
}

View File

@ -31,6 +31,7 @@
</RelativeLayout>
<ImageView
android:scaleType="centerCrop"
android:id="@+id/singleModeImageView"
android:layout_width="@dimen/medium_profile_picture_size"
android:layout_height="@dimen/medium_profile_picture_size"
@ -38,6 +39,7 @@
<ImageView
android:id="@+id/largeSingleModeImageView"
android:scaleType="centerCrop"
android:layout_width="@dimen/large_profile_picture_size"
android:layout_height="@dimen/large_profile_picture_size"
android:background="@drawable/profile_picture_view_large_background" />