From 231c7f5bf3a02e7c92dffc3c78d04acd6b54b7dc Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 6 Jun 2020 16:09:38 -0400 Subject: [PATCH] Fixed #397 - Add to manga dialog not removing from library on cancel --- .../tachiyomi/ui/library/AddToLibraryCategoriesDialog.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/AddToLibraryCategoriesDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/AddToLibraryCategoriesDialog.kt index 076750e354..1a8739f2b0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/AddToLibraryCategoriesDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/AddToLibraryCategoriesDialog.kt @@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.library import android.app.Dialog import android.os.Bundle import com.afollestad.materialdialogs.MaterialDialog +import com.afollestad.materialdialogs.callbacks.onCancel import com.afollestad.materialdialogs.list.listItemsMultiChoice import com.bluelinelabs.conductor.Controller import eu.kanade.tachiyomi.R @@ -52,7 +53,10 @@ class AddToLibraryCategoriesDialog(bundle: Bundle? = null) : } .positiveButton(android.R.string.ok) .negativeButton(android.R.string.cancel) { - (targetController as? Listener)?.addToLibraryCancelled(manga, position) + (targetController as? Listener)?.addToLibraryCancelled(manga, position) + } + .onCancel { + (targetController as? Listener)?.addToLibraryCancelled(manga, position) } }