From fe82c86c9330523937659ef18b6417e450179fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 7 Oct 2021 11:28:56 +0200 Subject: [PATCH] [Messages/Compose] Fix recipient adding dialog empty. --- .../modules/messages/compose/MessagesComposeChipCreator.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/compose/MessagesComposeChipCreator.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/compose/MessagesComposeChipCreator.kt index 649fd9ed..bae40587 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/compose/MessagesComposeChipCreator.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/compose/MessagesComposeChipCreator.kt @@ -62,10 +62,12 @@ class MessagesComposeChipCreator( Teacher.TYPE_EDUCATOR, Teacher.TYPE_STUDENT ) + + val adapter = nacho.adapter as? MessagesComposeSuggestionAdapter ?: return null val teachers = if (sortByCategory) - teacherList.sortedBy { it.typeDescription } + adapter.originalList.sortedBy { it.typeDescription } else - teacherList + adapter.originalList val category = mutableListOf() val categoryNames = mutableListOf()