Android: Fix SettingsActivity.onActivityResult

`or` is the bitwise or operator.

Fixes file pickers in the settings not saving your choice.
This commit is contained in:
JosJuice 2023-07-28 18:45:07 +02:00
parent 17fa9dfc4e
commit b5b8282ca9
1 changed files with 5 additions and 5 deletions

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