diff options
| author | 2024-02-13 14:46:56 -0500 | |
|---|---|---|
| committer | 2024-02-13 14:46:56 -0500 | |
| commit | ad4ae399033853e6fe45a5e2a0009c614ab199fc (patch) | |
| tree | 7ac05d40e89a26a4227cf91369d8904b61883446 /src/android | |
| parent | Merge pull request #13007 from t895/screen-bias (diff) | |
| parent | android: Prevent user from dismissing mod/cheat notice (diff) | |
| download | yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.gz yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.tar.xz yuzu-ad4ae399033853e6fe45a5e2a0009c614ab199fc.zip | |
Merge pull request #13009 from t895/message-dialog-fix
android: Message dialog tweaks
Diffstat (limited to 'src/android')
| -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() { | |||
| 104 | requireActivity(), | 104 | requireActivity(), |
| 105 | titleId = R.string.addon_notice, | 105 | titleId = R.string.addon_notice, |
| 106 | descriptionId = R.string.addon_notice_description, | 106 | descriptionId = R.string.addon_notice_description, |
| 107 | positiveAction = { addonViewModel.showModInstallPicker(true) } | 107 | dismissible = false, |
| 108 | positiveAction = { addonViewModel.showModInstallPicker(true) }, | ||
| 109 | negativeAction = {}, | ||
| 110 | negativeButtonTitleId = R.string.close | ||
| 108 | ).show(parentFragmentManager, MessageDialogFragment.TAG) | 111 | ).show(parentFragmentManager, MessageDialogFragment.TAG) |
| 109 | addonViewModel.showModNoticeDialog(false) | 112 | addonViewModel.showModNoticeDialog(false) |
| 110 | } | 113 | } |
| @@ -119,7 +122,8 @@ class AddonsFragment : Fragment() { | |||
| 119 | requireActivity(), | 122 | requireActivity(), |
| 120 | titleId = R.string.confirm_uninstall, | 123 | titleId = R.string.confirm_uninstall, |
| 121 | descriptionId = R.string.confirm_uninstall_description, | 124 | descriptionId = R.string.confirm_uninstall_description, |
| 122 | positiveAction = { addonViewModel.onDeleteAddon(it) } | 125 | positiveAction = { addonViewModel.onDeleteAddon(it) }, |
| 126 | negativeAction = {} | ||
| 123 | ).show(parentFragmentManager, MessageDialogFragment.TAG) | 127 | ).show(parentFragmentManager, MessageDialogFragment.TAG) |
| 124 | addonViewModel.setAddonToDelete(null) | 128 | addonViewModel.setAddonToDelete(null) |
| 125 | } | 129 | } |
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() { | |||
| 42 | } else if (positiveButtonString.isNotEmpty()) { | 42 | } else if (positiveButtonString.isNotEmpty()) { |
| 43 | positiveButtonString | 43 | positiveButtonString |
| 44 | } else if (messageDialogViewModel.positiveAction != null) { | 44 | } else if (messageDialogViewModel.positiveAction != null) { |
| 45 | getString(R.string.close) | ||
| 46 | } else { | ||
| 47 | getString(android.R.string.ok) | 45 | getString(android.R.string.ok) |
| 46 | } else { | ||
| 47 | getString(R.string.close) | ||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | val negativeButtonId = requireArguments().getInt(NEGATIVE_BUTTON_TITLE_ID) | 50 | val negativeButtonId = requireArguments().getInt(NEGATIVE_BUTTON_TITLE_ID) |
| @@ -131,7 +131,7 @@ class MessageDialogFragment : DialogFragment() { | |||
| 131 | * @param positiveButtonTitleId String resource ID that will be used for the positive button. | 131 | * @param positiveButtonTitleId String resource ID that will be used for the positive button. |
| 132 | * [positiveButtonTitleString] used if 0. | 132 | * [positiveButtonTitleString] used if 0. |
| 133 | * @param positiveButtonTitleString String that will be used for the positive button. | 133 | * @param positiveButtonTitleString String that will be used for the positive button. |
| 134 | * android.R.string.ok used if empty. android.R.string.close will be used if [positiveAction] | 134 | * android.R.string.close used if empty. android.R.string.ok will be used if [positiveAction] |
| 135 | * is not null. | 135 | * is not null. |
| 136 | * @param positiveAction Lambda to run when the positive button is clicked. | 136 | * @param positiveAction Lambda to run when the positive button is clicked. |
| 137 | * @param showNegativeButton Normally the negative button isn't shown if there is no | 137 | * @param showNegativeButton Normally the negative button isn't shown if there is no |