mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-08 00:05:02 +01:00
Sorted error, spotless'd
This commit is contained in:
parent
945ae821fb
commit
c3adf103d7
@ -309,7 +309,7 @@ class LibraryScreenModel(
|
|||||||
|
|
||||||
return mapValues { (key, value) ->
|
return mapValues { (key, value) ->
|
||||||
if (key.sort.type == LibrarySort.Type.Random) {
|
if (key.sort.type == LibrarySort.Type.Random) {
|
||||||
return@mapValues value.shuffled(Random(libraryPreferences.currentRandomSortSeed().get()))
|
return@mapValues value.shuffled(Random(libraryPreferences.randomSortSeed().get()))
|
||||||
}
|
}
|
||||||
|
|
||||||
val comparator = key.sort.comparator()
|
val comparator = key.sort.comparator()
|
||||||
|
@ -17,7 +17,7 @@ class SetSortModeForCategory(
|
|||||||
val category = categoryId?.let { categoryRepository.get(it) }
|
val category = categoryId?.let { categoryRepository.get(it) }
|
||||||
val flags = (category?.flags ?: 0) + type + direction
|
val flags = (category?.flags ?: 0) + type + direction
|
||||||
if (type == LibrarySort.Type.Random) {
|
if (type == LibrarySort.Type.Random) {
|
||||||
preferences.currentRandomSortSeed().set(Random.nextInt())
|
preferences.randomSortSeed().set(Random.nextInt())
|
||||||
}
|
}
|
||||||
if (category != null && preferences.categorizedDisplaySettings().get()) {
|
if (category != null && preferences.categorizedDisplaySettings().get()) {
|
||||||
categoryRepository.updatePartial(
|
categoryRepository.updatePartial(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user