From ea013f16867e26fe96cea8b765943de1417a71ef Mon Sep 17 00:00:00 2001 From: Ivan Kupalov Date: Sat, 15 Jul 2017 14:57:51 +0300 Subject: [PATCH] Fix bug where there were no media in the boosted toot and avatar opened wrong profile. --- .../main/java/com/keylesspalace/tusky/util/ViewDataUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java index 91c09073..95112387 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java @@ -22,7 +22,7 @@ public final class ViewDataUtils { Status visibleStatus = status.reblog == null ? status : status.reblog; return new StatusViewData.Builder() .setId(status.id) - .setAttachments(status.attachments) + .setAttachments(visibleStatus.attachments) .setAvatar(visibleStatus.account.avatar) .setContent(visibleStatus.content) .setCreatedAt(visibleStatus.createdAt) @@ -37,7 +37,7 @@ public final class ViewDataUtils { .setSpoilerText(visibleStatus.spoilerText) .setRebloggedByUsername(status.reblog == null ? null : status.account.username) .setUserFullName(visibleStatus.account.getDisplayName()) - .setSenderId(status.account.id) + .setSenderId(visibleStatus.account.id) .setRebloggingEnabled(visibleStatus.rebloggingAllowed()) .createStatusViewData(); }