From cc5bdd151c3bac6e2084ca0ae77e5ca05c7c33cf Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 9 May 2022 19:31:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B9=A6=E6=BA=90=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A0=A1=E9=AA=8C=E8=AE=BE=E7=BD=AE=E9=97=AA?= =?UTF-8?q?=E5=B1=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/book/source/manage/BookSourceActivity.kt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 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 05b8d5000..ca032e238 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 @@ -5,6 +5,8 @@ import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.SubMenu +import android.view.View +import androidx.appcompat.app.AlertDialog import androidx.activity.viewModels import androidx.appcompat.widget.PopupMenu import androidx.appcompat.widget.SearchView @@ -357,7 +359,7 @@ class BookSourceActivity : VMBaseActivity= 0 && lastItem >= 0 checkMessageRefreshJob(firstItem, lastItem).start() } - neutralButton(R.string.check_source_config) { - checkSource() - showDialogFragment() - } + neutralButton(R.string.check_source_config, null) cancelButton() } + //手动设置监听 避免点击打开校验设置后对话框关闭 + dialog.getButton(AlertDialog.BUTTON_NEUTRAL)?.let { + it.setOnClickListener(object: View.OnClickListener { + override fun onClick(view: View) { + showDialogFragment() + } + }) + } } @SuppressLint("InflateParams")