589
edits
m (Phishing -> Tags) |
|||
Line 66: | Line 66: | ||
Design methods for getting and setting tags | Design methods for getting and setting tags | ||
== Implementation == | |||
Tags are stored in preferences of the form | |||
"mailnews.tags.<key>.tag", "unicode string" | |||
"mailnews.tags.<key>.color, "color string" | |||
The key is an imap mod-utf7 version of the tag, suitable for use in a pref name, an imap keyword, and part of an x-mozilla-keys header. So, as you might guess, we actually store the key persistently, and translate it to the tag for display purposes. This also allows us to rename a tag by changing the pref without changing all the messages that have that tag. We can also remove a tag by removing the pref, and the key stored in the messages will then be ignored. |
edits