mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 11:26:01 +03:00
Banned users: use the counter as the title
This commit is contained in:
parent
562c6fbcce
commit
ace7ff464b
1 changed files with 35 additions and 31 deletions
|
@ -51,9 +51,17 @@ class RoomBannedMemberListController @Inject constructor(
|
|||
override fun buildModels(data: RoomBannedMemberListViewState?) {
|
||||
val bannedList = data?.bannedMemberSummaries?.invoke() ?: return
|
||||
|
||||
buildProfileSection(
|
||||
stringProvider.getString(R.string.room_settings_banned_users_title)
|
||||
)
|
||||
val quantityString = stringProvider.getQuantityString(R.plurals.room_settings_banned_users_count, bannedList.size, bannedList.size)
|
||||
|
||||
if (bannedList.isEmpty()) {
|
||||
buildProfileSection(stringProvider.getString(R.string.room_settings_banned_users_title))
|
||||
|
||||
genericFooterItem {
|
||||
id("footer")
|
||||
text(quantityString)
|
||||
}
|
||||
} else {
|
||||
buildProfileSection(quantityString)
|
||||
|
||||
bannedList.join(
|
||||
each = { _, roomMember ->
|
||||
|
@ -83,10 +91,6 @@ class RoomBannedMemberListController @Inject constructor(
|
|||
}
|
||||
}
|
||||
)
|
||||
|
||||
genericFooterItem {
|
||||
id("footer")
|
||||
text(stringProvider.getQuantityString(R.plurals.room_settings_banned_users_count, bannedList.size, bannedList.size))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue