mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 01:11:54 +01:00
Logic fixes to library
Fixed trying to update with special groupings Fixed special groups duplicating manga in a list
This commit is contained in:
parent
3d0f72d50b
commit
1d0545f5de
@ -385,12 +385,14 @@ class LibraryController(
|
||||
swipe_refresh.isRefreshing = false
|
||||
if (!LibraryUpdateService.isRunning()) {
|
||||
when {
|
||||
!presenter.showAllCategories || presenter.groupType != BY_DEFAULT -> {
|
||||
presenter.categories.find { it.id == presenter.currentCategory }?.let {
|
||||
!presenter.showAllCategories && presenter.groupType == BY_DEFAULT -> {
|
||||
presenter.allCategories.find { it.id == presenter.currentCategory }?.let {
|
||||
updateLibrary(it)
|
||||
}
|
||||
}
|
||||
presenter.allCategories.size <= 1 -> updateLibrary()
|
||||
presenter.allCategories.size <= 1 || presenter.groupType > BY_DEFAULT -> {
|
||||
updateLibrary()
|
||||
}
|
||||
preferences.updateOnRefresh().getOrDefault() == -1 -> {
|
||||
MaterialDialog(activity!!).title(R.string.what_should_update)
|
||||
.negativeButton(android.R.string.cancel)
|
||||
|
@ -435,7 +435,7 @@ class LibraryPresenter(
|
||||
val categories = db.getCategories().executeAsBlocking().toMutableList()
|
||||
var libraryManga = db.getLibraryMangas().executeAsBlocking()
|
||||
val showAll = showAllCategories
|
||||
if (groupType <= BY_DEFAULT || !libraryIsGrouped) {
|
||||
if (groupType > BY_DEFAULT) {
|
||||
libraryManga = libraryManga.distinctBy { it.id }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user