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 { val items = mutableListOf<AutocompleteMemberItem>().apply {
if (members.isNotEmpty()) { if (members.isNotEmpty()) {
if (everyone != null) { add(membersHeader)
// add header only when there is everyone tag as well
add(membersHeader)
}
addAll(members) addAll(members)
} }
everyone?.let { everyone?.let {
if (members.isNotEmpty()) { val everyoneHeader = createEveryoneHeader()
// add header only when there are members as well add(everyoneHeader)
val everyoneHeader = createEveryoneHeader()
add(everyoneHeader)
}
add(it) add(it)
} }
} }