Update VectorPreferences.kt

This commit is contained in:
Neil Alexander 2021-02-19 15:17:42 +00:00 committed by GitHub
parent adc461d2f3
commit 2b403371a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,11 +246,9 @@ class VectorPreferences @Inject constructor(private val context: Context) {
* particularly useful when you need to be notified of a configuration change * particularly useful when you need to be notified of a configuration change
* in a background service, e.g. for the P2P demos. * in a background service, e.g. for the P2P demos.
*/ */
fun subscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) { fun subscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) {
defaultPrefs.registerOnSharedPreferenceChangeListener(listener) defaultPrefs.registerOnSharedPreferenceChangeListener(listener)
} }
fun unsubscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) { fun unsubscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) {
defaultPrefs.unregisterOnSharedPreferenceChangeListener(listener) defaultPrefs.unregisterOnSharedPreferenceChangeListener(listener)
} }