[polari] connectionPopover: Reconnect does not do anything when connected



commit 51bff04cca072b0778f2bcbce8a2447988f92632
Author: Isabella Ribeiro <belinhacbr gmail com>
Date:   Mon Feb 15 16:21:57 2016 -0200

    connectionPopover: Reconnect does not do anything when connected
    
    When already connected, the reconnect button on popover does not do
    anything.
    
    To fix this issue, we changed the reconnect action which is now
    using  the  reconnect_async() from tp account to disconnect and
    connect in every call. But this solution doesn't apply when the
    account is offline, the  proposed solution for this in a future
    implementation is to connect to all accounts on startup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761276

 src/chatroomManager.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index b270193..9891294 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -267,7 +267,10 @@ const _ChatroomManager = new Lang.Class({
         let accountPath = parameter.deep_unpack();
         let factory = Tp.AccountManager.dup().get_factory();
         let account = factory.ensure_account(accountPath, []);
-        this._restoreSavedChannels(account);
+        account.reconnect_async(Lang.bind(this,
+            function (a, res){
+                a.reconnect_finish(res);
+            }));
     },
 
     _onAuthenticateAccountActivated: function(action, parameter) {


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