diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-09-20 21:00:34 +0200 |
---|---|---|
committer | Charles Lombardo <clombardo169@gmail.com> | 2023-09-20 21:00:34 +0200 |
commit | bdb4fd208f53322f13f245b6a32be6393a698330 (patch) | |
tree | 1a7ae1b51cfbed4352c5bfea4de8e2a18180e2a1 | |
parent | Merge pull request #11543 from t895/import-export-user-data (diff) | |
download | yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar.gz yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar.bz2 yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar.lz yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar.xz yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.tar.zst yuzu-bdb4fd208f53322f13f245b6a32be6393a698330.zip |
Diffstat (limited to '')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt index ee2d44718..6c3c00147 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt @@ -65,25 +65,20 @@ class ImportExportSavesFragment : DialogFragment() { } override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - return if (savesFolderRoot == "") { - MaterialAlertDialogBuilder(requireContext()) - .setTitle(R.string.manage_save_data) - .setMessage(R.string.import_export_saves_no_profile) - .setPositiveButton(android.R.string.ok, null) - .show() - } else { - MaterialAlertDialogBuilder(requireContext()) - .setTitle(R.string.manage_save_data) - .setMessage(R.string.manage_save_data_description) - .setNegativeButton(R.string.export_saves) { _, _ -> - exportSave() - } - .setPositiveButton(R.string.import_saves) { _, _ -> - documentPicker.launch(arrayOf("application/zip")) - } - .setNeutralButton(android.R.string.cancel, null) - .show() + val builder = MaterialAlertDialogBuilder(requireContext()) + .setTitle(R.string.manage_save_data) + .setPositiveButton(R.string.import_saves) { _, _ -> + documentPicker.launch(arrayOf("application/zip")) + } + .setNeutralButton(android.R.string.cancel, null) + + if (savesFolderRoot != "") { + builder.setNegativeButton(R.string.export_saves) { _, _ -> + exportSave() + } } + + return builder.show() } /** |