From feac15be6213bf72131b3c3376b5639d48ba00ba Mon Sep 17 00:00:00 2001 From: DannyAAM Date: Wed, 15 Nov 2023 13:35:00 +0800 Subject: [PATCH] use positive instead of neutral for single OK button --- .../console3ds/mset9_installer_android/MSET9Installer.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/moe/saru/homebrew/console3ds/mset9_installer_android/MSET9Installer.kt b/app/src/main/java/moe/saru/homebrew/console3ds/mset9_installer_android/MSET9Installer.kt index 4dca0d60..72eeb84a 100644 --- a/app/src/main/java/moe/saru/homebrew/console3ds/mset9_installer_android/MSET9Installer.kt +++ b/app/src/main/java/moe/saru/homebrew/console3ds/mset9_installer_android/MSET9Installer.kt @@ -112,17 +112,14 @@ class MSET9Installer : Fragment() { } } - private fun showAlert(title: String, message: String, neutral: String? = null, setup: ((AlertDialog.Builder) -> AlertDialog.Builder)? = null) { + private fun showAlert(title: String, message: String, neutral: String = getString(R.string.alert_neutral), setup: ((AlertDialog.Builder) -> AlertDialog.Builder)? = null) { val builder = AlertDialog.Builder(mainActivity) .setTitle(title) .setMessage(message) - if (neutral != null) { - builder.setNeutralButton(neutral) { _, _ -> } - } if (setup != null) { setup(builder) } else { - builder.setNeutralButton(getString(R.string.alert_neutral)) { _, _ -> } + builder.setPositiveButton(neutral) { _, _ -> } } builder.show() }