[polari] roomList: Minor cleanup



commit d8ce9a5a7314baf03c4fe29b8145ebf90e28c0b6
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 24 22:47:27 2013 +0200

    roomList: Minor cleanup

 src/roomList.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index cbad89e..832111b 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -147,9 +147,12 @@ const RoomList = new Lang.Class({
     },
 
     _updateHeader: function(row, before) {
-        let beforeAccount = before ? before.room.channel.connection.get_account()
-                                   : null;
-        let account = row.room.channel.connection.get_account();
+        let getAccount = function(row) {
+            return row ? row.room.channel.connection.get_account() : null;
+        };
+        let beforeAccount = getAccount(before);
+        let account = getAccount(row);
+
         if (beforeAccount == account) {
             row.set_header(null);
             return;


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