From 11dacbab81bb970af65c6bef78f4abd15fed1cdc Mon Sep 17 00:00:00 2001 From: Maxime Naturel Date: Thu, 17 Feb 2022 13:59:30 +0100 Subject: [PATCH] Revert "Adding header section only when necessary" This reverts commit 96ed30ccc45ab47326a5058b73906be085540a98. --- .../member/AutocompleteMemberPresenter.kt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt b/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt index b646e22f17..ab4b598153 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt @@ -88,18 +88,12 @@ class AutocompleteMemberPresenter @AssistedInject constructor(context: Context, val items = mutableListOf().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) } }