Closed
Bug 506577
Opened 15 years ago
Closed 15 years ago
convert users of IsSpecialFolder(folder, ...) over to use folder.isSpecialFolder(...)
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b4
People
(Reporter: mkmelin, Assigned: mkmelin)
Details
Attachments
(2 files)
(deleted),
patch
|
asuth
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Since bug 412690 we have a folder method isSpecialFolder which matches the IsSpecialFolder() method we had before.
This bug removes the js IsSpecialFolder() method.
Attachment #390746 -
Flags: superreview?(neil)
Attachment #390746 -
Flags: review?(bugmail)
Comment 1•15 years ago
|
||
Comment on attachment 390746 [details] [diff] [review]
proposed fix
on file: mail/base/content/msgViewNavigation.js line 84
> let flags = nsMsgFolderFlags.Trash | nsMsgFolderFlags.SentMail |
> nsMsgFolderFlags.Drafts | nsMsgFolderFlags.Queue |
> nsMsgFolderFlags.Templates | nsMsgFolderFlags.Junk;
> if (!folder.isSpecialFolder(flags, true)) {
If you are going to introduce a temporary for readability, the temporary
should probably have an appropriate name. ignoreTrashJunkOrOutgoingFlags
seems like an explanation of that flag set.. You can also hoist the temporary
outside the loop so that there's a better reason for the temporary. You will
need to hoist the nsMsgFolderFlags constant at the same time.
on file: mail/base/content/phishingDetector.js line 112
> let flags = nsMsgFolderFlags.SentMail | nsMsgFolderFlags.Drafts |
> nsMsgFolderFlags.Templates | nsMsgFolderFlags.Queue;
> if (folder.isSpecialFolder(flags, true))
This temporary could be outgoingFolderFlags.
Attachment #390746 -
Flags: review?(bugmail) → review+
Comment 2•15 years ago
|
||
Comment on attachment 390746 [details] [diff] [review]
proposed fix
I think it might be nice to define extra constants in nsMsgFolderFlags.idl for these frequently used combinations e.g. a) outgoing folders b) non-navigated folders.
> // if this is the drafts, sent, or send later folder,
> // we show "Recipient" instead of "Author"
> const nsMsgFolderFlags = Components.interfaces.nsMsgFolderFlags;
>- SetSentFolderColumns(IsSpecialFolder(newFolder, nsMsgFolderFlags.SentMail | nsMsgFolderFlags.Drafts | nsMsgFolderFlags.Queue, true));
[Not sure why we don't have Templates here, but I don't know where the Thunderbird equivalent of this is, or was.]
Attachment #390746 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 3•15 years ago
|
||
Yeah seems like Templates should be there. Added.
changeset: 3155:3473dd892063
http://hg.mozilla.org/comm-central/rev/3473dd892063
->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
(In reply to comment #3)
> Yeah seems like Templates should be there. Added.
I don't see it in the changeset. I also like your ignoreFlags and outgoingFlags names. A pity you missed two occurrences of bare "flags" in suite/mailnews :-(
Assignee | ||
Comment 5•15 years ago
|
||
Wonder if i forgot to refresh...
Assignee | ||
Comment 6•15 years ago
|
||
changeset: 3179:d9097b2ec83a
http://hg.mozilla.org/comm-central/rev/d9097b2ec83a
You need to log in
before you can comment on or make changes to this bug.
Description
•