mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 01:39:18 +01:00
Destroy action mode after actioning in chapters list (closes #3004)
This commit is contained in:
parent
694de99a3f
commit
03baa21185
@ -485,10 +485,12 @@ class ChaptersController :
|
|||||||
if (presenter.preferences.removeAfterMarkedAsRead()) {
|
if (presenter.preferences.removeAfterMarkedAsRead()) {
|
||||||
deleteChapters(chapters)
|
deleteChapters(chapters)
|
||||||
}
|
}
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun markAsUnread(chapters: List<ChapterItem>) {
|
private fun markAsUnread(chapters: List<ChapterItem>) {
|
||||||
presenter.markChaptersRead(chapters, false)
|
presenter.markChaptersRead(chapters, false)
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun downloadChapters(chapters: List<ChapterItem>) {
|
private fun downloadChapters(chapters: List<ChapterItem>) {
|
||||||
@ -501,6 +503,7 @@ class ChaptersController :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showDeleteChaptersConfirmationDialog() {
|
private fun showDeleteChaptersConfirmationDialog() {
|
||||||
@ -518,16 +521,19 @@ class ChaptersController :
|
|||||||
if (chapterPos != -1) {
|
if (chapterPos != -1) {
|
||||||
markAsRead(prevChapters.take(chapterPos))
|
markAsRead(prevChapters.take(chapterPos))
|
||||||
}
|
}
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bookmarkChapters(chapters: List<ChapterItem>, bookmarked: Boolean) {
|
private fun bookmarkChapters(chapters: List<ChapterItem>, bookmarked: Boolean) {
|
||||||
presenter.bookmarkChapters(chapters, bookmarked)
|
presenter.bookmarkChapters(chapters, bookmarked)
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun deleteChapters(chapters: List<ChapterItem>) {
|
fun deleteChapters(chapters: List<ChapterItem>) {
|
||||||
if (chapters.isEmpty()) return
|
if (chapters.isEmpty()) return
|
||||||
|
|
||||||
presenter.deleteChapters(chapters)
|
presenter.deleteChapters(chapters)
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onChaptersDeleted(chapters: List<ChapterItem>) {
|
fun onChaptersDeleted(chapters: List<ChapterItem>) {
|
||||||
@ -570,6 +576,7 @@ class ChaptersController :
|
|||||||
if (chaptersToDownload.isNotEmpty()) {
|
if (chaptersToDownload.isNotEmpty()) {
|
||||||
downloadChapters(chaptersToDownload)
|
downloadChapters(chaptersToDownload)
|
||||||
}
|
}
|
||||||
|
destroyActionModeIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showCustomDownloadDialog() {
|
private fun showCustomDownloadDialog() {
|
||||||
|
Loading…
Reference in New Issue
Block a user