mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-17 06:27:29 +01:00
Remove download all chapters menu item
Users can still select all the chapters (long press + select all) to download them.
This commit is contained in:
@@ -524,13 +524,6 @@ class MangaInfoScreenModel(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of filtered or all chapter items if [skipFiltered] is false.
|
||||
*/
|
||||
private fun getChapterItems(): List<ChapterItem> {
|
||||
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<Chapter> {
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user