diff --git a/app/src/main/java/eu/kanade/presentation/components/DownloadDropdownMenu.kt b/app/src/main/java/eu/kanade/presentation/components/DownloadDropdownMenu.kt index 2ee7e95cb..ccf0b72f0 100644 --- a/app/src/main/java/eu/kanade/presentation/components/DownloadDropdownMenu.kt +++ b/app/src/main/java/eu/kanade/presentation/components/DownloadDropdownMenu.kt @@ -13,7 +13,6 @@ fun DownloadDropdownMenu( expanded: Boolean, onDismissRequest: () -> Unit, onDownloadClicked: (DownloadAction) -> Unit, - includeDownloadAllOption: Boolean = true, ) { DropdownMenu( expanded = expanded, @@ -25,7 +24,6 @@ fun DownloadDropdownMenu( DownloadAction.NEXT_10_CHAPTERS to pluralStringResource(R.plurals.download_amount, 10, 10), DownloadAction.NEXT_25_CHAPTERS to pluralStringResource(R.plurals.download_amount, 25, 25), DownloadAction.UNREAD_CHAPTERS to stringResource(R.string.download_unread), - (DownloadAction.ALL_CHAPTERS to stringResource(R.string.download_all)).takeIf { includeDownloadAllOption }, ).map { (downloadAction, string) -> DropdownMenuItem( text = { Text(text = string) }, diff --git a/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt b/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt index b1f005942..ba871b0fd 100644 --- a/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt @@ -9,7 +9,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource -import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.presentation.components.TabbedDialog import eu.kanade.presentation.components.TabbedDialogPaddings import eu.kanade.presentation.components.TriStateItem @@ -21,6 +20,7 @@ import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibrarySort import tachiyomi.domain.library.model.display import tachiyomi.domain.library.model.sort +import tachiyomi.domain.library.service.LibraryPreferences import tachiyomi.domain.manga.model.TriStateFilter import tachiyomi.presentation.core.components.CheckboxItem import tachiyomi.presentation.core.components.HeadingItem diff --git a/app/src/main/java/eu/kanade/presentation/manga/MangaScreenConstants.kt b/app/src/main/java/eu/kanade/presentation/manga/MangaScreenConstants.kt index 55eece48c..22a6664d0 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/MangaScreenConstants.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/MangaScreenConstants.kt @@ -6,7 +6,6 @@ enum class DownloadAction { NEXT_10_CHAPTERS, NEXT_25_CHAPTERS, UNREAD_CHAPTERS, - ALL_CHAPTERS, } enum class EditCoverAction { diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt index 90dccb328..23df1e746 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt @@ -291,7 +291,6 @@ fun LibraryBottomActionMenu( expanded = downloadExpanded, onDismissRequest = onDismissRequest, onDownloadClicked = onDownloadClicked, - includeDownloadAllOption = false, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index bbf9f6e22..6e9836436 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -524,13 +524,6 @@ class MangaInfoScreenModel( } } - /** - * Returns the list of filtered or all chapter items if [skipFiltered] is false. - */ - private fun getChapterItems(): List { - return if (skipFiltered) filteredChapters.orEmpty().toList() else allChapters.orEmpty() - } - /** * Returns the next unread chapter or null if everything is read. */ @@ -540,7 +533,8 @@ class MangaInfoScreenModel( } private fun getUnreadChapters(): List { - return getChapterItems() + val chapterItems = if (skipFiltered) filteredChapters.orEmpty().toList() else allChapters.orEmpty() + return chapterItems .filter { (chapter, dlStatus) -> !chapter.read && dlStatus == Download.State.NOT_DOWNLOADED } .map { it.chapter } } @@ -613,7 +607,6 @@ class MangaInfoScreenModel( DownloadAction.NEXT_10_CHAPTERS -> getUnreadChaptersSorted().take(10) DownloadAction.NEXT_25_CHAPTERS -> getUnreadChaptersSorted().take(25) DownloadAction.UNREAD_CHAPTERS -> getUnreadChapters() - DownloadAction.ALL_CHAPTERS -> getChapterItems().map { it.chapter } } if (chaptersToDownload.isNotEmpty()) { startDownload(chaptersToDownload, false) diff --git a/i18n/src/main/res/values/strings.xml b/i18n/src/main/res/values/strings.xml index 90ec078df..b932752d9 100644 --- a/i18n/src/main/res/values/strings.xml +++ b/i18n/src/main/res/values/strings.xml @@ -659,7 +659,6 @@ Next chapter Next %d chapters - All Unread Custom cover Cover