Fix bot badge in accounts in list fragment (#4474)

Fixes #4455
This commit is contained in:
Levi Bard 2024-05-31 13:42:37 +02:00 committed by GitHub
parent d200d1e15e
commit b2d4092124
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}
}