From 8a889472f8f408236f0099e344ebe13928e02883 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 11 Feb 2020 13:51:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B9=A6=E6=BA=90=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/source/manage/BookSourceActivity.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 702973880..637dfc9dd 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -22,10 +22,7 @@ import io.legado.app.data.entities.BookSource import io.legado.app.help.ItemTouchCallback import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.PermissionsCompat -import io.legado.app.lib.dialogs.alert -import io.legado.app.lib.dialogs.cancelButton -import io.legado.app.lib.dialogs.customView -import io.legado.app.lib.dialogs.okButton +import io.legado.app.lib.dialogs.* import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.primaryTextColor import io.legado.app.lib.theme.view.ATEAutoCompleteTextView @@ -173,7 +170,12 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity } override fun onClickMainAction() { - super.onClickMainAction() + this@BookSourceActivity + .alert(titleResource = R.string.sure, messageResource = R.string.sure_del) { + okButton { viewModel.delSelection(adapter.getSelection()) } + noButton { } + } + .show() } }) @@ -185,7 +187,6 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity R.id.menu_disable_selection -> viewModel.disableSelection(adapter.getSelection()) R.id.menu_enable_explore -> viewModel.enableSelectExplore(adapter.getSelection()) R.id.menu_disable_explore -> viewModel.disableSelectExplore(adapter.getSelection()) - R.id.menu_del_selection -> viewModel.delSelection(adapter.getSelection()) R.id.menu_export_selection -> viewModel.exportSelection(adapter.getSelection()) R.id.menu_check_source -> CheckSource.start(this, adapter.getSelection()) }