Fixed #397 - Add to manga dialog not removing from library on cancel

This commit is contained in:
Jay 2020-06-06 16:09:38 -04:00
parent f5f4b8a119
commit 231c7f5bf3

View File

@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.library
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.callbacks.onCancel
import com.afollestad.materialdialogs.list.listItemsMultiChoice import com.afollestad.materialdialogs.list.listItemsMultiChoice
import com.bluelinelabs.conductor.Controller import com.bluelinelabs.conductor.Controller
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
@ -54,6 +55,9 @@ class AddToLibraryCategoriesDialog<T>(bundle: Bundle? = null) :
.negativeButton(android.R.string.cancel) { .negativeButton(android.R.string.cancel) {
(targetController as? Listener)?.addToLibraryCancelled(manga, position) (targetController as? Listener)?.addToLibraryCancelled(manga, position)
} }
.onCancel {
(targetController as? Listener)?.addToLibraryCancelled(manga, position)
}
} }
interface Listener { interface Listener {