From 71f18759fba52b5dfe52d18d9cad5a8421abefa1 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Mon, 27 May 2024 13:36:47 +0200 Subject: [PATCH] fix(Search): display bot icon only for bots Due to the way Android handles lists, the icon could be wrongly shown on non-bot accounts. Fixes https://github.com/LucasGGamerM/moshidon/issues/418. --- .../android/ui/viewholders/AccountViewHolder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java b/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java index 4f4cbdf8d8..337da20f22 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java @@ -148,10 +148,8 @@ public void onBind(AccountViewModel item){ pronouns.setVisibility(pronounsString.isPresent() ? View.VISIBLE : View.GONE); pronounsString.ifPresent(p -> HtmlParser.setTextWithCustomEmoji(pronouns, p, item.account.emojis)); - if(item.account.bot) { - botIcon.setVisibility(View.VISIBLE); - } - + botIcon.setVisibility(item.account.bot ? View.VISIBLE : View.GONE); + /* unused in megalodon boolean hasVerifiedLink=item.verifiedLink!=null; if(!hasVerifiedLink)