Closed
Bug 523538
Opened 15 years ago
Closed 15 years ago
Don't sync to/from pref if <setting> has no pref
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
fennec1.0b5
People
(Reporter: Mardak, Assigned: Gavin)
References
Details
Attachments
(1 file, 1 obsolete file)
2.30 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Normally settings are bound to a pref, but Weave might re-use the <setting type="string"> for the existing styling but not the pref sync. If you enter a value (or password) into a <setting> without a "pref" attribute, it'll get stored in the "" pref. And on restart, it'll get loaded from that pref.
Reporter | ||
Comment 1•15 years ago
|
||
For now, I'm grabbing each <setting> and setting their "pref" field to {}.
Assignee | ||
Comment 2•15 years ago
|
||
This just checks that we have a valid "pref" attribute before trying to sync to the pref. Prefs without "name" attributes already don't do anything, so no need to worry about syncing from them. Mardak, is this sufficient for your needs?
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Assignee | ||
Updated•15 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Reporter | ||
Comment 3•15 years ago
|
||
Comment on attachment 410841 [details] [diff] [review] patch >+ <constructor><![CDATA[ >+ let prefValue = this.hasAttribute("pref") && this.pref.valueFromPreferences; > if (prefValue != null) { let prefValue = this.pref.valueFromPreferences; if (this.hasAttribute("pref") && prefValue != null) { Otherwise, it'll end up setting |false| as the value. Alternatively, my hack-y solution is to replace the field "pref" to {} ;) <field name="pref">this.hasAttribute("pref") ? .. : {}</field>
Assignee | ||
Comment 4•15 years ago
|
||
Ok, I guess that does have the advantage of consolidating the check in the base binding. I'll use a getter though, to make it possible to set the pref attribute after binding attachment.
Assignee | ||
Comment 5•15 years ago
|
||
Attachment #410841 -
Attachment is obsolete: true
Attachment #411148 -
Flags: review?(mark.finkle)
Updated•15 years ago
|
Attachment #411148 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 6•15 years ago
|
||
https://hg.mozilla.org/mobile-browser/rev/02ca91675919
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → B5
You need to log in
before you can comment on or make changes to this bug.
Description
•