Merge pull request #12076 from JosJuice/android-when-or

Android: Fix SettingsActivity.onActivityResult
This commit is contained in:
JosJuice 2023-07-28 19:13:16 +02:00 committed by GitHub
commit bed3874497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,11 +181,11 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
fragment!!.adapter!!.onFilePickerConfirmation(path!!)
}
MainPresenter.REQUEST_GAME_FILE
or MainPresenter.REQUEST_SD_FILE
or MainPresenter.REQUEST_WAD_FILE
or MainPresenter.REQUEST_WII_SAVE_FILE
or MainPresenter.REQUEST_NAND_BIN_FILE -> {
MainPresenter.REQUEST_GAME_FILE,
MainPresenter.REQUEST_SD_FILE,
MainPresenter.REQUEST_WAD_FILE,
MainPresenter.REQUEST_WII_SAVE_FILE,
MainPresenter.REQUEST_NAND_BIN_FILE -> {
val uri = canonicalizeIfPossible(result!!.data!!)
val validExtensions: Set<String> =
if (requestCode == MainPresenter.REQUEST_GAME_FILE) FileBrowserHelper.GAME_EXTENSIONS else FileBrowserHelper.RAW_EXTENSION