mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 23:28:58 +03:00
Distinguish between no results and loading when sorting global search results
This commit is contained in:
parent
776f6a9a16
commit
2be9871d05
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,8 @@ open class GlobalSearchPresenter(
|
|||
.sortedWith(
|
||||
compareBy(
|
||||
// Bubble up sources that actually have results
|
||||
{ it.results.isNullOrEmpty() },
|
||||
{ it.results?.isEmpty() },
|
||||
{ it.results == null },
|
||||
// Same as initial sort, i.e. pinned first then alphabetically
|
||||
{ it.source.id.toString() !in pinnedSourceIds },
|
||||
{ "${it.source.name.toLowerCase()} (${it.source.lang})" }
|
||||
|
|
Loading…
Reference in a new issue