[polari] chatroomManager: Select the first room from the observer
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatroomManager: Select the first room from the observer
- Date: Thu, 8 Aug 2013 13:11:38 +0000 (UTC)
commit c8104efd75ae67ef00baf9149624404359fd69f7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jul 26 22:33:25 2013 +0200
chatroomManager: Select the first room from the observer
While we are joined to any rooms, there should be a currently
active one; so while we generally only move the selection when
we are actually handling a channel, make an exception if the newly
observed room is the only one. In most cases the room has been
requested by ourselves, except in the case where a contact opens
a private conversation before we join any rooms.
src/chatroomManager.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index fe8fc08..6a4ad11 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -106,7 +106,9 @@ const _ChatroomManager = new Lang.Class({
if (channel.has_interface(Tp.IFACE_CHANNEL_INTERFACE_GROUP) &&
channel.group_self_contact != null)
return;
- this._ensureRoomForChannel(channel);
+ let room = this._ensureRoomForChannel(channel);
+ if (this.roomCount == 1)
+ this.setActiveRoom(room);
}));
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]