Browse Source

Dismiss action toolbar after download action in updates (closes #4729)

arkon 4 years ago
parent
commit
355d5af8ae

+ 4 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt

@@ -210,6 +210,7 @@ class UpdatesController :
      */
     private fun downloadChapters(chapters: List<UpdatesItem>) {
         presenter.downloadChapters(chapters)
+        destroyActionModeIfNeeded()
     }
 
     /**
@@ -251,6 +252,7 @@ class UpdatesController :
         if (presenter.preferences.removeAfterMarkedAsRead()) {
             deleteChapters(chapters)
         }
+        destroyActionModeIfNeeded()
     }
 
     /**
@@ -259,10 +261,12 @@ class UpdatesController :
      */
     private fun markAsUnread(chapters: List<UpdatesItem>) {
         presenter.markChapterRead(chapters, false)
+        destroyActionModeIfNeeded()
     }
 
     override fun deleteChapters(chaptersToDelete: List<UpdatesItem>) {
         presenter.deleteChapters(chaptersToDelete)
+        destroyActionModeIfNeeded()
     }
 
     private fun destroyActionModeIfNeeded() {