Description[MD Settings] Stop prefs singleton firing change events at initialization
settings-prefs-singleton relies on settings-prefs instances to see changes
made by the UI. shared-prefs forwards these changes by observing "prefs.*"
and firing a custom event including the change record.
The custom event was named "prefs-changed", which is the same name as
an event fired by Polymer when "this.prefs" is set. So, we were observing
both "prefs.*" and "prefs" in one function, but those events have different
arguments.
Use a different name ("shared-prefs-changed") for this.
The shared-prefs instances still need to listen to changes coming from the
singleton, so we have settings-prefs-singleton manually fire the prefs-changed
event when its prefs change.
Committed: https://crrev.com/6547a5017257ded6d8a4dc04dc7a1879c41c2209
Cr-Commit-Position: refs/heads/master@{#364889}
Patch Set 1 #Patch Set 2 : fire from singleton #Messages
Total messages: 15 (7 generated)
|