mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 01:37:50 +00:00
Merge pull request #13654 from JosJuice/android-clear-without-dismiss
Android: Don't dismiss AdvancedMappingDialog when pressing Clear
This commit is contained in:
commit
f1ffcf2b00
@ -52,8 +52,9 @@ class AdvancedMappingDialog(
|
||||
selectDefaultDevice()
|
||||
}
|
||||
|
||||
val expression: String
|
||||
var expression: String
|
||||
get() = binding.editExpression.text.toString()
|
||||
set(value) = binding.editExpression.setText(value)
|
||||
|
||||
override fun onItemClick(adapterView: AdapterView<*>?, view: View, position: Int, id: Long) =
|
||||
setSelectedDevice(devices[position])
|
||||
|
@ -347,13 +347,15 @@ class SettingsAdapter(
|
||||
dialog.setButton(
|
||||
AlertDialog.BUTTON_NEUTRAL,
|
||||
context.getString(R.string.clear)
|
||||
) { _: DialogInterface?, _: Int ->
|
||||
item.clearValue()
|
||||
notifyItemChanged(position)
|
||||
fragmentView.onSettingChanged()
|
||||
}
|
||||
) { _: DialogInterface?, _: Int -> }
|
||||
dialog.setCanceledOnTouchOutside(false)
|
||||
dialog.show()
|
||||
|
||||
// We're setting this OnClickListener late so that pressing the Clear button won't result
|
||||
// in the dialog closing
|
||||
dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setOnClickListener {
|
||||
dialog.expression = ""
|
||||
}
|
||||
}
|
||||
|
||||
fun onFilePickerDirectoryClick(item: SettingsItem, position: Int) {
|
||||
|
Loading…
Reference in New Issue
Block a user