mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
android: Allow importing saves even if no saves are found
Exporting still won't be allowed on an empty save directory.
This commit is contained in:
parent
1fae4a01a8
commit
bdb4fd208f
@ -65,25 +65,20 @@ class ImportExportSavesFragment : DialogFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
return if (savesFolderRoot == "") {
|
val builder = MaterialAlertDialogBuilder(requireContext())
|
||||||
MaterialAlertDialogBuilder(requireContext())
|
.setTitle(R.string.manage_save_data)
|
||||||
.setTitle(R.string.manage_save_data)
|
.setPositiveButton(R.string.import_saves) { _, _ ->
|
||||||
.setMessage(R.string.import_export_saves_no_profile)
|
documentPicker.launch(arrayOf("application/zip"))
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
}
|
||||||
.show()
|
.setNeutralButton(android.R.string.cancel, null)
|
||||||
} else {
|
|
||||||
MaterialAlertDialogBuilder(requireContext())
|
if (savesFolderRoot != "") {
|
||||||
.setTitle(R.string.manage_save_data)
|
builder.setNegativeButton(R.string.export_saves) { _, _ ->
|
||||||
.setMessage(R.string.manage_save_data_description)
|
exportSave()
|
||||||
.setNegativeButton(R.string.export_saves) { _, _ ->
|
}
|
||||||
exportSave()
|
|
||||||
}
|
|
||||||
.setPositiveButton(R.string.import_saves) { _, _ ->
|
|
||||||
documentPicker.launch(arrayOf("application/zip"))
|
|
||||||
}
|
|
||||||
.setNeutralButton(android.R.string.cancel, null)
|
|
||||||
.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return builder.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user