Comment 231 for bug 52667

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

(From update of attachment 365962)
Yeah, there's some problem with updating the button when changing mails.

I think it's better to just do it all in one patch, especially as if you change entity string you have to bump the names...

>diff -r 7bfd2406b167 mail/base/content/mail3PaneWindowCommands.js
>--- a/mail/base/content/mail3PaneWindowCommands.js Fri Mar 06 14:50:59 2009 +0100
>+++ b/mail/base/content/mail3PaneWindowCommands.js Fri Mar 06 15:01:13 2009 -0500
>@@ -306,10 +306,15 @@
> return false; // else fall thru
> case "cmd_reply":
> case "button_reply":
>+ case "cmd_replyall":
>+ case "button_replyall":
>+ msgHdr = msgHdrForCurrentMessage();

Needs to be declared? (Or maybe it is alreay earlier, either way, not so nice.)

>+ let showReplyAllButton = msgHdr && (msgHdr.recipients.split(",").length > 1 || msgHdr.ccList);

Trailing space, but break the line after ||

>+ UpdateReplyButtons( showReplyAllButton?"replyAll":"reply" );

Here and else where, please skip the spaces after/before "("
(Add spaces around "?" though.)

>+ if ( command == "cmd_replyall" || command == "button_replyall" )
>+ return showReplyAllButton; // else fall through

Remove extra spaces.

>+ let replyAllButton = buttonBox.getButton('hdrReplyAllButton');
>+ let replyButton = buttonBox.getButton('hdrReplyButton');
>+
>+ if (replyAllButton)
>+ replyAllButton.hidden = (buttonsToShow != "replyAll");
>+
>+ if (replyButton)
>+ replyButton.hidden = (buttonsToShow != "reply");

The buttons don't always exist?
Also, please try to be consistent with " and '