Account manager pops up on wake if there are no autojoins

RESOLVED FIXED in Instantbird 43

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: aleth, Assigned: aleth)

Tracking

trunk
Instantbird 43

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
STR
Use a profile with some connected accounts, none of which are set to autojoin.
Send your PC to sleep until the accounts disconnect.
They automatically reconnect on wake, but the account manager pops up too.
(Assignee)

Comment 1

4 years ago
Posted patch noshowaccmgr.diff (obsolete) — Splinter Review
Waking from sleep, previously open connections may get disconnected, and the account-disconnected observer calls showAccountManagerIfNeeded if account.reconnectAttempt is still false at that point. Then, from that function, unless one of the other accounts is already (re)connecting or connected, the account manager will be shown.

We should simply add a short delay here so that the disconnect/reconnect sequence has sorted itself out by the time showAccountManagerIfNeeded is called.
Attachment #8656772 - Flags: review?(clokep)
Comment on attachment 8656772 [details] [diff] [review]
noshowaccmgr.diff

Review of attachment 8656772 [details] [diff] [review]:
-----------------------------------------------------------------

Interesting bug, thanks!

::: im/modules/ibCore.jsm
@@ +269,4 @@
>    observe: function(aSubject, aTopic, aData) {
>      if (aTopic == "account-disconnected") {
>        let account = aSubject.QueryInterface(Ci.imIAccount);
> +      if (account.reconnectAttempt || this._pendingShowAccountManager)

If you check _pendingShowAccountManager a line earlier you can avoid the QueryInterface call. It's a rare case though so up to you.

@@ +270,5 @@
>      if (aTopic == "account-disconnected") {
>        let account = aSubject.QueryInterface(Ci.imIAccount);
> +      if (account.reconnectAttempt || this._pendingShowAccountManager)
> +        return;
> +      // Wait a 300ms to be sure no automatic reconnections would still

I find this a bit difficult to understand, how about "Automatic reconnections (e.g. if the computer just woke up from sleep) might not have been triggered yet, wait 300ms for these before attempting to show the account manager."?
Attachment #8656772 - Flags: review?(clokep) → review+
(Assignee)

Comment 3

4 years ago
r+ carried forward.
Attachment #8656811 - Flags: review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
(Assignee)

Updated

4 years ago
Attachment #8656772 - Attachment is obsolete: true
(Assignee)

Comment 4

4 years ago
https://hg.mozilla.org/comm-central/rev/e99501b47a9f75e91345b352745931d94b7d8c27
Bug 1191483 - Don't show account manager when reconnecting after waking from sleep. r=nhnt11
(Assignee)

Updated

4 years ago
Assignee: nobody → aleth
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 43
You need to log in before you can comment on or make changes to this bug.