[Messages/Compose] Fix recipient adding dialog empty.

This commit is contained in:
Kuba Szczodrzyński 2021-10-07 11:28:56 +02:00
parent 692555732d
commit fe82c86c93
No known key found for this signature in database
GPG Key ID: 70CB8A85BA1633CB

View File

@ -62,10 +62,12 @@ class MessagesComposeChipCreator(
Teacher.TYPE_EDUCATOR, Teacher.TYPE_EDUCATOR,
Teacher.TYPE_STUDENT Teacher.TYPE_STUDENT
) )
val adapter = nacho.adapter as? MessagesComposeSuggestionAdapter ?: return null
val teachers = if (sortByCategory) val teachers = if (sortByCategory)
teacherList.sortedBy { it.typeDescription } adapter.originalList.sortedBy { it.typeDescription }
else else
teacherList adapter.originalList
val category = mutableListOf<Teacher>() val category = mutableListOf<Teacher>()
val categoryNames = mutableListOf<CharSequence>() val categoryNames = mutableListOf<CharSequence>()