Clean up Account adapters (#3202)

* make BlocksAdapter use viewbinding

* remove LoadingFooterViewHolder

* cleanup code

* move accountlist to component packes

* make FollowRequestsHeaderAdapter use viewbinding

* add license to MutesAdapter

* move accountlist to component packages

* use ConstraintLayout in item_blocked_user.xml

* support the bot badge everywhere

* cleanup code

* cleanup xml files

* ktlint

* ktlint
This commit is contained in:
Konrad Pozniak 2023-02-04 20:29:13 +01:00 committed by GitHub
commit 15ff6191ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 253 additions and 228 deletions

View file

@ -50,11 +50,11 @@ class FollowRequestViewHolder(
}.emojify(account.emojis, itemView, animateEmojis)
}
binding.notificationTextView.visible(showHeader)
val format = itemView.context.getString(R.string.post_username_format)
val formattedUsername = String.format(format, account.username)
val formattedUsername = itemView.context.getString(R.string.post_username_format, account.username)
binding.usernameTextView.text = formattedUsername
val avatarRadius = binding.avatar.context.resources.getDimensionPixelSize(R.dimen.avatar_radius_48dp)
loadAvatar(account.avatar, binding.avatar, avatarRadius, animateAvatar)
binding.avatarBadge.visible(showBotOverlay && account.bot)
}
fun setupActionListener(listener: AccountActionListener, accountId: String) {