removePreferences deletes the named preference keys (comma-separated), along with their per-key meta.
(value string)
| 317 | // removePreferences deletes the named preference keys (comma-separated), |
| 318 | // along with their per-key meta. |
| 319 | func (ps *UserProfileStore) removePreferences(value string) bool { |
| 320 | changed := false |
| 321 | for _, k := range splitListItems(value) { |
| 322 | if _, ok := ps.profile.Preferences[k]; ok { |
| 323 | delete(ps.profile.Preferences, k) |
| 324 | delete(ps.profile.FieldMeta, "pref:"+k) |
| 325 | changed = true |
| 326 | } |
| 327 | } |
| 328 | return changed |
| 329 | } |
| 330 | |
| 331 | // upsertStances records "position :: reason" entries. A stance restating an |
| 332 | // existing position (same stem) supersedes it — positions evolve, they do |
no test coverage detected