[polari] mainWindow: Fix updating user-list button counter



commit 2e621e7588bcc7faa7d5c7cfe5add96910594a5c
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 28 22:13:34 2014 +0100

    mainWindow: Fix updating user-list button counter
    
    Since we now update the counter in ChatroomManager::active-state-changed,
    we no longer need to do the same in ::active-changed; however we should
    properly initialize the counter in the constructor to not miss the case
    where we don't open any rooms at all on startup.

 src/mainWindow.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 0e687d1..7475f91 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -53,6 +53,8 @@ const MainWindow = new Lang.Class({
         this._roomManager.connect('active-state-changed',
                                   Lang.bind(this, this._updateUserListLabel));
 
+        this._updateUserListLabel();
+
         this._selectionModeAction = app.lookup_action('selection-mode');
         this._selectionModeAction.connect('notify::state',
                     Lang.bind(this, this._onSelectionModeChanged));
@@ -221,7 +223,6 @@ const MainWindow = new Lang.Class({
 
         this._inputStack.set_visible_child_name(this._room ? this._room.id
                                                            : 'placeholder');
-        this._updateUserListLabel();
 
         if (!this._room)
             return; // finished


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