mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Destroy action mode after actioning in chapters list (closes #3004)
(cherry picked from commit 03baa21185)
			
			
This commit is contained in:
		| @@ -499,10 +499,12 @@ class ChaptersController : | ||||
|         if (presenter.preferences.removeAfterMarkedAsRead()) { | ||||
|             deleteChapters(chapters) | ||||
|         } | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     private fun markAsUnread(chapters: List<ChapterItem>) { | ||||
|         presenter.markChaptersRead(chapters, false) | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     private fun downloadChapters(chapters: List<ChapterItem>) { | ||||
| @@ -515,6 +517,7 @@ class ChaptersController : | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     private fun showDeleteChaptersConfirmationDialog() { | ||||
| @@ -532,16 +535,19 @@ class ChaptersController : | ||||
|         if (chapterPos != -1) { | ||||
|             markAsRead(prevChapters.take(chapterPos)) | ||||
|         } | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     private fun bookmarkChapters(chapters: List<ChapterItem>, bookmarked: Boolean) { | ||||
|         presenter.bookmarkChapters(chapters, bookmarked) | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     fun deleteChapters(chapters: List<ChapterItem>) { | ||||
|         if (chapters.isEmpty()) return | ||||
|  | ||||
|         presenter.deleteChapters(chapters) | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     fun onChaptersDeleted(chapters: List<ChapterItem>) { | ||||
| @@ -584,6 +590,7 @@ class ChaptersController : | ||||
|         if (chaptersToDownload.isNotEmpty()) { | ||||
|             downloadChapters(chaptersToDownload) | ||||
|         } | ||||
|         destroyActionModeIfNeeded() | ||||
|     } | ||||
|  | ||||
|     private fun showCustomDownloadDialog() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user