|
|
@ -66,15 +66,23 @@ class ImportExportSavesFragment : DialogFragment() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
|
|
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
|
|
|
return MaterialAlertDialogBuilder(requireContext())
|
|
|
|
return if (savesFolderRoot == "") {
|
|
|
|
.setTitle("Import/Export Saves")
|
|
|
|
MaterialAlertDialogBuilder(requireContext())
|
|
|
|
.setPositiveButton("Export") { _, _ ->
|
|
|
|
.setTitle(R.string.import_export_saves)
|
|
|
|
exportSave()
|
|
|
|
.setMessage("No profileID found. Launch a game first and then come back.")
|
|
|
|
}
|
|
|
|
.setPositiveButton(android.R.string.ok, null)
|
|
|
|
.setNeutralButton("Import") { _, _ ->
|
|
|
|
.show()
|
|
|
|
documentPicker.launch(arrayOf("application/zip"))
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
MaterialAlertDialogBuilder(requireContext())
|
|
|
|
.show()
|
|
|
|
.setTitle("Import/Export Saves")
|
|
|
|
|
|
|
|
.setPositiveButton("Export") { _, _ ->
|
|
|
|
|
|
|
|
exportSave()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.setNeutralButton("Import") { _, _ ->
|
|
|
|
|
|
|
|
documentPicker.launch(arrayOf("application/zip"))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.show()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|