From 8d6593e12c89bd38d4fcb6bfe13886d6449d317b Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Wed, 20 Mar 2024 17:20:19 -0300 Subject: [PATCH] feat(search): add back bot indicator to account search results preview --- .../ui/viewholders/AccountViewHolder.java | 7 ++++++- .../src/main/res/layout/item_account_list.xml | 19 ++++++++++++++++--- 2 files changed, 22 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 a431bf2c9e..6ba79a50aa 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 @@ -56,7 +56,7 @@ public class AccountViewHolder extends BindableViewHolder implements ImageLoaderViewHolder, UsableRecyclerView.Clickable, UsableRecyclerView.LongClickable{ private final TextView name, username, followers, pronouns, bio; - public final ImageView avatar; + public final ImageView avatar, botIcon; private final FrameLayout accessory; private final ProgressBarButton button; private final PopupMenu contextMenu; @@ -92,6 +92,7 @@ public AccountViewHolder(Fragment fragment, ViewGroup list, HashMap HtmlParser.setTextWithCustomEmoji(pronouns, p, item.account.emojis)); + if(item.account.bot) { + botIcon.setVisibility(View.VISIBLE); + } + /* unused in megalodon boolean hasVerifiedLink=item.verifiedLink!=null; if(!hasVerifiedLink) diff --git a/mastodon/src/main/res/layout/item_account_list.xml b/mastodon/src/main/res/layout/item_account_list.xml index 0d9053299c..3bbea040b2 100644 --- a/mastodon/src/main/res/layout/item_account_list.xml +++ b/mastodon/src/main/res/layout/item_account_list.xml @@ -15,7 +15,7 @@ android:importantForAccessibility="no" tools:src="#0f0"/> - - + + + +