[polari/wip/raresv/popoverRebasedOnTracker] userTracker: Minor cleanup
- From: Rares Visalom <raresvisalom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/raresv/popoverRebasedOnTracker] userTracker: Minor cleanup
- Date: Tue, 26 Jul 2016 23:04:17 +0000 (UTC)
commit 8a97e9d6c276fda9ad1d21b5e8797c7779cf6b2e
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jul 26 23:33:12 2016 +0200
userTracker: Minor cleanup
When a room is removed, rather than duplicating the condition for
whether the room is tracked, we can just check whether we have
room data for it - everything the function does will be useless
anyway if we don't have any data to operate on ...
src/userTracker.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 412adac..85703be 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -117,7 +117,7 @@ const UserTracker = new Lang.Class({
},
_onRoomRemoved: function(roomManager, room) {
- if (room.account != this._account)
+ if (!this._roomData.has(room))
return;
this._getRoomSignals(room).forEach(id => { room.disconnect(id); });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]