[polari] chatroomManager: Only present rooms that are result of user action
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatroomManager: Only present rooms that are result of user action
- Date: Thu, 8 Aug 2013 13:12:13 +0000 (UTC)
commit 4cc23f754d8e96741b3e6a50f8b5a8f69201a385
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 27 03:02:56 2013 +0200
chatroomManager: Only present rooms that are result of user action
src/chatroomManager.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index f0ace3f..a8aff44 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -178,13 +178,18 @@ const _ChatroomManager = new Lang.Class({
let [handler, account, connection,
channels, satisfied, userTime, context] = arguments;
+ let [present, time] = Tp.user_action_time_should_present(userTime);
+
this._processRequest(context, connection, channels, Lang.bind(this,
function(channel) {
let room = this._ensureRoomForChannel(channel);
//channel.join_async('', null);
- this.setActiveRoom(room);
+
+ if (present || this.roomCount == 1)
+ this.setActiveRoom(room);
}));
- this._app.get_active_window().present_with_time(userTime);
+ if (present)
+ this._app.get_active_window().present_with_time(time);
},
_addRoom: function(room) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]