mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
invoke the change listener in preference dialogs
This commit is contained in:
parent
5f7825a2ee
commit
5d4364eb95
@ -35,8 +35,8 @@ open class MaterialPreferenceFragment : PreferenceFragmentCompat() {
|
||||
preference.value = newValue
|
||||
preference.callChangeListener(newValue)
|
||||
|
||||
// dismiss the dialog
|
||||
dialog.dismiss()
|
||||
// invoke the on change listeners
|
||||
preference.callChangeListener(preference.value)
|
||||
}
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show()
|
||||
@ -55,6 +55,9 @@ open class MaterialPreferenceFragment : PreferenceFragmentCompat() {
|
||||
.setPositiveButton(R.string.okay) { _, _ ->
|
||||
// save the new value
|
||||
preference.text = binding.input.text.toString()
|
||||
|
||||
// invoke the on change listeners
|
||||
preference.callChangeListener(preference.text)
|
||||
}
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show()
|
||||
|
Loading…
Reference in New Issue
Block a user