don't resize avatar views dynamically

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-03-02 14:32:03 +01:00
parent 98a2a62cbf
commit 00c4b13f17
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -154,7 +154,7 @@ public class DisplayUtils {
}
private static void updateViewSize(@Nullable ImageInfo imageInfo, SimpleDraweeView draweeView) {
if (imageInfo != null) {
if (imageInfo != null && draweeView.getId() != R.id.messageUserAvatar) {
int maxSize = draweeView.getContext().getResources().getDimensionPixelSize(R.dimen.maximum_file_preview_size);
draweeView.getLayoutParams().width = imageInfo.getWidth() > maxSize ? maxSize : imageInfo.getWidth();
draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;