mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 04:58:56 +01:00
Remove source lang on migrate screen also seperate removed source on alphabetical sort (#7041)
* Remove source lang on migrate screen also seperate removed source on alphabetical sort * Review changes * Rename Variable
This commit is contained in:
@@ -37,11 +37,14 @@ class GetSourcesWithFavoriteCount(
|
||||
val id2 = b.first.name.toLongOrNull()
|
||||
when (sorting) {
|
||||
SetMigrateSorting.Mode.ALPHABETICAL -> {
|
||||
collator.compare(a.first.name.lowercase(locale), b.first.name.lowercase(locale))
|
||||
when {
|
||||
id1 != null && id2 == null -> -1
|
||||
id2 != null && id1 == null -> 1
|
||||
else -> collator.compare(a.first.name.lowercase(locale), b.first.name.lowercase(locale))
|
||||
}
|
||||
}
|
||||
SetMigrateSorting.Mode.TOTAL -> {
|
||||
when {
|
||||
id1 != null && id2 != null -> a.second.compareTo(b.second)
|
||||
id1 != null && id2 == null -> -1
|
||||
id2 != null && id1 == null -> 1
|
||||
else -> a.second.compareTo(b.second)
|
||||
|
||||
Reference in New Issue
Block a user