mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor(library): Some adjustments
This commit is contained in:
parent
bf164608a0
commit
a9b2ec06cd
1 changed files with 3 additions and 3 deletions
|
@ -1055,7 +1055,7 @@ class LibraryPresenter(
|
|||
|
||||
// In default grouping, which uses category as group, a manga can be in multiple categories.
|
||||
// So before we group it by different type, we should make the list unique.
|
||||
val libraryManga = getLibraryManga.await().apply { if (groupType > BY_DEFAULT) { distinctBy { it.id } } }
|
||||
val libraryManga = getLibraryManga.await()
|
||||
val showAll = showAllCategories
|
||||
|
||||
val (items, categories, hiddenItems) = if (groupType <= BY_DEFAULT || !libraryIsGrouped) {
|
||||
|
@ -1066,7 +1066,7 @@ class LibraryPresenter(
|
|||
showAll,
|
||||
)
|
||||
} else {
|
||||
getCustomMangaItems(
|
||||
getDynamicLibraryItems(
|
||||
libraryManga,
|
||||
preferences.librarySortingMode().get(),
|
||||
preferences.librarySortingAscending().get(),
|
||||
|
@ -1177,7 +1177,7 @@ class LibraryPresenter(
|
|||
)
|
||||
}
|
||||
|
||||
private fun getCustomMangaItems(
|
||||
private fun getDynamicLibraryItems(
|
||||
libraryManga: List<LibraryManga>,
|
||||
sortingMode: Int,
|
||||
isAscending: Boolean,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue