[polari] telepathyClient: Fix inconsistency on resume



commit 741c55ba0965b92d39ec1577d5ea194b26a39c6e
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Sep 9 01:56:00 2016 +0200

    telepathyClient: Fix inconsistency on resume
    
    When the :network-available property changes repeatedly in quick
    succession (which apparently happens when resuming from suspend),
    we can end up in an inconsistent state where an account has a
    requested presence of OFFLINE, but is in fact fully connected.
    Work around this by applying the same work-around as in the
    previous commit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770751

 src/telepathyClient.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index 50b783a..bdf24e6 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -206,7 +206,8 @@ const TelepathyClient = new Lang.Class({
                                                              : 'unavailable'));
 
         this._accountsMonitor.enabledAccounts.forEach(a => {
-            if (a.connection)
+            if (a.presence_type == Tp.ConnectionPresenceType.AVAILABLE &&
+                a.connection_status == Tp.ConnectionStatus.CONNECTED)
                 this._onAccountStatusChanged(this._accountsMonitor, a);
             else
                 this._setAccountPresence(a, presence);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]