From a4e1ee69af17c3f358d8fc5d850039024f746913 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sun, 27 Sep 2020 00:39:11 +0900 Subject: [PATCH] Fix double requestLayout --- .../viewholder/directmessages/DirectMessageMediaViewHolder.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectMessageMediaViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectMessageMediaViewHolder.java index 2dd96e9e..8d7e0cd7 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectMessageMediaViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectMessageMediaViewHolder.java @@ -43,7 +43,6 @@ public class DirectMessageMediaViewHolder extends DirectMessageItemViewHolder { layoutParams.width = widthHeight.first != null ? widthHeight.first : 0; layoutParams.height = widthHeight.second != null ? widthHeight.second : 0; binding.ivMediaPreview.requestLayout(); - binding.ivMediaPreview.requestLayout(); binding.ivMediaPreview.setImageURI(mediaModel.getThumbUrl()); final MediaItemType modelMediaType = mediaModel.getMediaType(); binding.typeIcon.setVisibility(modelMediaType == MediaItemType.MEDIA_TYPE_VIDEO || modelMediaType == MediaItemType.MEDIA_TYPE_SLIDER