From fb2d3024ab3ebd08e16a52ddbc720bdb7b5632b1 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Fri, 19 Apr 2019 15:23:30 +0200 Subject: [PATCH] fix bug where avatars where shown too small (#1199) --- .../keylesspalace/tusky/adapter/StatusViewHolder.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java index 52455efcb..00367d037 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java @@ -50,9 +50,12 @@ public class StatusViewHolder extends StatusBaseViewHolder { super.setAvatar(url, rebloggedUrl, isBot); Context context = avatar.getContext(); - if (!TextUtils.isEmpty(rebloggedUrl)) { - int padding = Utils.dpToPx(context, 12); - avatar.setPaddingRelative(0, 0, padding, padding); + boolean hasReblog = rebloggedUrl != null && !rebloggedUrl.isEmpty(); + int padding = hasReblog ? Utils.dpToPx(context, 12) : 0; + + avatar.setPaddingRelative(0, 0, padding, padding); + + if (hasReblog) { avatarInset.setVisibility(View.VISIBLE); Glide.with(context) .load(rebloggedUrl)