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