Fixed group avatar with two participants

This commit is contained in:
Sylvain Berfini 2023-10-18 11:35:51 +02:00
parent 3d455d0fc9
commit 0defb639c2

View file

@ -391,10 +391,14 @@ private suspend fun loadContactPictureWithCoil(
}
for (i in 0 until rectangles.size) {
// To prevent deformation for the bottom image when merging 3 of them
val src = if (drawables.size == 3 && i == 2) {
// To prevent deformation for the bottom image when merging 3 of them
val quarter = w / 4
Rect(0, quarter, w, 3 * quarter)
} else if (drawables.size == 2) {
// To prevent deformation when two images are next to each other
val quarter = w / 4
Rect(quarter, 0, 3 * quarter, w)
} else {
null
}