mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-25 02:02:04 +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
|
swipe_refresh.isRefreshing = false
|
||||||
if (!LibraryUpdateService.isRunning()) {
|
if (!LibraryUpdateService.isRunning()) {
|
||||||
when {
|
when {
|
||||||
!presenter.showAllCategories || presenter.groupType != BY_DEFAULT -> {
|
!presenter.showAllCategories && presenter.groupType == BY_DEFAULT -> {
|
||||||
presenter.categories.find { it.id == presenter.currentCategory }?.let {
|
presenter.allCategories.find { it.id == presenter.currentCategory }?.let {
|
||||||
updateLibrary(it)
|
updateLibrary(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
presenter.allCategories.size <= 1 -> updateLibrary()
|
presenter.allCategories.size <= 1 || presenter.groupType > BY_DEFAULT -> {
|
||||||
|
updateLibrary()
|
||||||
|
}
|
||||||
preferences.updateOnRefresh().getOrDefault() == -1 -> {
|
preferences.updateOnRefresh().getOrDefault() == -1 -> {
|
||||||
MaterialDialog(activity!!).title(R.string.what_should_update)
|
MaterialDialog(activity!!).title(R.string.what_should_update)
|
||||||
.negativeButton(android.R.string.cancel)
|
.negativeButton(android.R.string.cancel)
|
||||||
|
@ -435,7 +435,7 @@ class LibraryPresenter(
|
|||||||
val categories = db.getCategories().executeAsBlocking().toMutableList()
|
val categories = db.getCategories().executeAsBlocking().toMutableList()
|
||||||
var libraryManga = db.getLibraryMangas().executeAsBlocking()
|
var libraryManga = db.getLibraryMangas().executeAsBlocking()
|
||||||
val showAll = showAllCategories
|
val showAll = showAllCategories
|
||||||
if (groupType <= BY_DEFAULT || !libraryIsGrouped) {
|
if (groupType > BY_DEFAULT) {
|
||||||
libraryManga = libraryManga.distinctBy { it.id }
|
libraryManga = libraryManga.distinctBy { it.id }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user