From b2d4092124bf132b47b4ad1d8cf777ce7ee5132b Mon Sep 17 00:00:00 2001 From: Levi Bard Date: Fri, 31 May 2024 13:42:37 +0200 Subject: [PATCH] Fix bot badge in accounts in list fragment (#4474) Fixes #4455 --- .../java/com/keylesspalace/tusky/AccountsInListFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt b/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt index 4e6e42091..3b5d8518f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt @@ -40,6 +40,7 @@ import com.keylesspalace.tusky.util.loadAvatar import com.keylesspalace.tusky.util.show import com.keylesspalace.tusky.util.unsafeLazy import com.keylesspalace.tusky.util.viewBinding +import com.keylesspalace.tusky.util.visible import com.keylesspalace.tusky.viewmodel.AccountsInListViewModel import com.keylesspalace.tusky.viewmodel.State import dagger.hilt.android.AndroidEntryPoint @@ -201,8 +202,10 @@ class AccountsInListFragment : DialogFragment(R.layout.fragment_accounts_in_list val account = getItem(position) val animateAvatar = preferences.getBoolean(PrefKeys.ANIMATE_GIF_AVATARS, false) val animateEmojis = preferences.getBoolean(PrefKeys.ANIMATE_CUSTOM_EMOJIS, false) + val showBotOverlay = preferences.getBoolean(PrefKeys.SHOW_BOT_OVERLAY, false) holder.binding.displayNameTextView.text = account.name.emojify(account.emojis, holder.binding.displayNameTextView, animateEmojis) holder.binding.usernameTextView.text = account.username + holder.binding.avatarBadge.visible(showBotOverlay && account.bot) loadAvatar(account.avatar, holder.binding.avatar, radius, animateAvatar) } }