mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Default category disappear everytime a new category is added
This commit is contained in:
parent
32019a2fd7
commit
4b4c375f44
1 changed files with 9 additions and 1 deletions
|
@ -740,7 +740,15 @@ class LibraryPresenter(
|
||||||
|
|
||||||
values.sortedWith(Comparator(sortFn))
|
values.sortedWith(Comparator(sortFn))
|
||||||
}.toSortedMap { category, category2 ->
|
}.toSortedMap { category, category2 ->
|
||||||
category.order.compareTo(category2.order)
|
// Force default category to already be at the top. This also for some reason fixed a bug where Default
|
||||||
|
// category would disappear whenever a new category is added.
|
||||||
|
if (category.id == 0) {
|
||||||
|
-1
|
||||||
|
} else if (category2.id == 0) {
|
||||||
|
1
|
||||||
|
} else {
|
||||||
|
category.order.compareTo(category2.order)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue