Closed Bug 1418834 Opened 7 years ago Closed 7 years ago

Clicking a new message popup notification should select the right conversation

Categories

(Thunderbird :: Instant Messaging, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 59.0

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently clicking a new message popup notification will select the chat tab, but not the specific conversation related to the notification, so the first conversation with unread messages will be selected. This is potentially very confusing/annoying (if you start typing quickly a reply to the message you saw in the notification, you may send your reply to the wrong conversation). Additionally, when no Thunderbird main window exists, the current code is completely broken. Support for this case is implemented, but has obviously never been tested (access to Services.wm.getMostRecentWindow("mail:3pane").document which obviously throws a JS error when there's no window, use of 'window' to attempt to open a new window, which can't work from a JS module...).
Attached patch Patch (deleted) — Splinter Review
The reason for moving the whole observer code to an inline arrow function is so that I can access aMessage.conversation in the closure to know which conversation is related to the notification that has been clicked.
Attachment #8929889 - Flags: review?(clokep)
The reason for using the Services.appShell.hiddenDOMWindow.openDialog hack rather than a more normal Services.ww.openWindow call is to be able to pass a raw JS object as argument without having to worry about wrapping it in objects implementing nsISupports.
Attachment #8929889 - Flags: review?(clokep) → review+
Pushed by florian@queze.net: https://hg.mozilla.org/comm-central/rev/526482d119f6 Clicking a new message popup notification should select the right conversation, r=clokep.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 59.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: