diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-13 20:46:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 20:46:56 +0100 |
commit | ad4ae399033853e6fe45a5e2a0009c614ab199fc (patch) | |
tree | 7ac05d40e89a26a4227cf91369d8904b61883446 /src | |
parent | Merge pull request #13007 from t895/screen-bias (diff) | |
parent | android: Prevent user from dismissing mod/cheat notice (diff) | |
download | yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.gz yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.bz2 yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.lz yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.xz yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.zst yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt | 8 | ||||
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/MessageDialogFragment.kt | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt index f5647fa95..872553ac4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt @@ -104,7 +104,10 @@ class AddonsFragment : Fragment() { requireActivity(), titleId = R.string.addon_notice, descriptionId = R.string.addon_notice_description, - positiveAction = { addonViewModel.showModInstallPicker(true) } + dismissible = false, + positiveAction = { addonViewModel.showModInstallPicker(true) }, + negativeAction = {}, + negativeButtonTitleId = R.string.close ).show(parentFragmentManager, MessageDialogFragment.TAG) addonViewModel.showModNoticeDialog(false) } @@ -119,7 +122,8 @@ class AddonsFragment : Fragment() { requireActivity(), titleId = R.string.confirm_uninstall, descriptionId = R.string.confirm_uninstall_description, - positiveAction = { addonViewModel.onDeleteAddon(it) } + positiveAction = { addonViewModel.onDeleteAddon(it) }, + negativeAction = {} ).show(parentFragmentManager, MessageDialogFragment.TAG) addonViewModel.setAddonToDelete(null) } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/MessageDialogFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/MessageDialogFragment.kt index 685df0d59..c370964e1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/MessageDialogFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/MessageDialogFragment.kt @@ -42,9 +42,9 @@ class MessageDialogFragment : DialogFragment() { } else if (positiveButtonString.isNotEmpty()) { positiveButtonString } else if (messageDialogViewModel.positiveAction != null) { - getString(R.string.close) - } else { getString(android.R.string.ok) + } else { + getString(R.string.close) } val negativeButtonId = requireArguments().getInt(NEGATIVE_BUTTON_TITLE_ID) @@ -131,7 +131,7 @@ class MessageDialogFragment : DialogFragment() { * @param positiveButtonTitleId String resource ID that will be used for the positive button. * [positiveButtonTitleString] used if 0. * @param positiveButtonTitleString String that will be used for the positive button. - * android.R.string.ok used if empty. android.R.string.close will be used if [positiveAction] + * android.R.string.close used if empty. android.R.string.ok will be used if [positiveAction] * is not null. * @param positiveAction Lambda to run when the positive button is clicked. * @param showNegativeButton Normally the negative button isn't shown if there is no |