mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 03:59:19 +01:00
Sort Manga by title in MigrationMangaScreeen
(#7392)
This commit is contained in:
parent
ee38671400
commit
ef3acb8c43
@ -10,6 +10,7 @@ import kotlinx.coroutines.flow.StateFlow
|
|||||||
import kotlinx.coroutines.flow.asStateFlow
|
import kotlinx.coroutines.flow.asStateFlow
|
||||||
import kotlinx.coroutines.flow.catch
|
import kotlinx.coroutines.flow.catch
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
|
import kotlinx.coroutines.flow.map
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
@ -29,8 +30,11 @@ class MigrationMangaPresenter(
|
|||||||
.catch { exception ->
|
.catch { exception ->
|
||||||
_state.value = MigrateMangaState.Error(exception)
|
_state.value = MigrateMangaState.Error(exception)
|
||||||
}
|
}
|
||||||
.collectLatest { list ->
|
.map { list ->
|
||||||
_state.value = MigrateMangaState.Success(list)
|
list.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.title })
|
||||||
|
}
|
||||||
|
.collectLatest { sortedList ->
|
||||||
|
_state.value = MigrateMangaState.Success(sortedList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user