Filter local manga as downloaded (#1674)
* Filter local manga as downloaded * Filter local manga chapters as downloaded
This commit is contained in:
parent
46896d9e86
commit
3186661420
@ -126,6 +126,10 @@ class LibraryPresenter(
|
|||||||
|
|
||||||
// Filter when there are no downloads.
|
// Filter when there are no downloads.
|
||||||
if (filterDownloaded) {
|
if (filterDownloaded) {
|
||||||
|
// Local manga are always downloaded
|
||||||
|
if (item.manga.source == LocalSource.ID) {
|
||||||
|
return@f true
|
||||||
|
}
|
||||||
// Don't bother with directory checking if download count has been set.
|
// Don't bother with directory checking if download count has been set.
|
||||||
if (item.downloadCount != -1) {
|
if (item.downloadCount != -1) {
|
||||||
return@f item.downloadCount > 0
|
return@f item.downloadCount > 0
|
||||||
|
@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.database.models.Manga
|
|||||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||||
import eu.kanade.tachiyomi.data.download.model.Download
|
import eu.kanade.tachiyomi.data.download.model.Download
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
|
import eu.kanade.tachiyomi.source.LocalSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||||
import eu.kanade.tachiyomi.util.isNullOrUnsubscribed
|
import eu.kanade.tachiyomi.util.isNullOrUnsubscribed
|
||||||
@ -179,7 +180,7 @@ class ChaptersPresenter(
|
|||||||
observable = observable.filter { it.read }
|
observable = observable.filter { it.read }
|
||||||
}
|
}
|
||||||
if (onlyDownloaded()) {
|
if (onlyDownloaded()) {
|
||||||
observable = observable.filter { it.isDownloaded }
|
observable = observable.filter { it.isDownloaded || it.manga.source == LocalSource.ID }
|
||||||
}
|
}
|
||||||
if (onlyBookmarked()) {
|
if (onlyBookmarked()) {
|
||||||
observable = observable.filter { it.bookmark }
|
observable = observable.filter { it.bookmark }
|
||||||
|
Loading…
Reference in New Issue
Block a user