Revert "Adding header section only when necessary"

This reverts commit 96ed30ccc4.
This commit is contained in:
Maxime Naturel 2022-02-17 13:59:30 +01:00
parent 96ed30ccc4
commit 11dacbab81

View File

@ -88,18 +88,12 @@ class AutocompleteMemberPresenter @AssistedInject constructor(context: Context,
val items = mutableListOf<AutocompleteMemberItem>().apply {
if (members.isNotEmpty()) {
if (everyone != null) {
// add header only when there is everyone tag as well
add(membersHeader)
}
add(membersHeader)
addAll(members)
}
everyone?.let {
if (members.isNotEmpty()) {
// add header only when there are members as well
val everyoneHeader = createEveryoneHeader()
add(everyoneHeader)
}
val everyoneHeader = createEveryoneHeader()
add(everyoneHeader)
add(it)
}
}