mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Consider sort direction when downloading next n chapters (fixes #4916)
This commit is contained in:
		| @@ -1004,11 +1004,17 @@ class MangaController : | ||||
|  | ||||
|     // OVERFLOW MENU DIALOGS | ||||
|  | ||||
|     private fun getUnreadChaptersSorted() = presenter.chapters | ||||
|         .sortedWith(presenter.getChapterSort()) | ||||
|         .filter { !it.read && it.status == Download.State.NOT_DOWNLOADED } | ||||
|         .distinctBy { it.name } | ||||
|         .reversed() | ||||
|     private fun getUnreadChaptersSorted(): List<ChapterItem> { | ||||
|         val chapters = presenter.chapters | ||||
|             .sortedWith(presenter.getChapterSort()) | ||||
|             .filter { !it.read && it.status == Download.State.NOT_DOWNLOADED } | ||||
|             .distinctBy { it.name } | ||||
|         return if (presenter.sortDescending()) { | ||||
|             chapters.reversed() | ||||
|         } else { | ||||
|             chapters | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private fun downloadChapters(choice: Int) { | ||||
|         val chaptersToDownload = when (choice) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user