Sort teachers by name in school and teachers tab (#2327)

This commit is contained in:
Mikołaj Pich 2023-10-23 13:05:05 +02:00 committed by GitHub
parent 5dffbdadfa
commit 9d62410530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,10 @@ class TeacherPresenter @Inject constructor(
.logResourceStatus("load teachers data") .logResourceStatus("load teachers data")
.onResourceData { .onResourceData {
view?.run { view?.run {
updateData(it.filter { item -> item.name.isNotBlank() }) updateData(it
.filter { item -> item.name.isNotBlank() }
.sortedBy { it.name }
)
showContent(it.isNotEmpty()) showContent(it.isNotEmpty())
showEmpty(it.isEmpty()) showEmpty(it.isEmpty())
showErrorView(false) showErrorView(false)