[polari] entryArea: Consider nickname changes when disconnected
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] entryArea: Consider nickname changes when disconnected
- Date: Mon, 10 Apr 2017 22:40:51 +0000 (UTC)
commit 911b95582f1781c827b204fdc606ff3e97012ebb
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Mar 23 23:12:06 2017 +0100
entryArea: Consider nickname changes when disconnected
Depending on whether the room is currently connected, we either use
the self-contact's :alias property or the account's :nickname one
for the nick button text. Either of those properties can change, but
we currently only update the text in the former case. Start tracking
changes to the :nickname property is well to make sure we properly
update the button while disconnected.
https://bugzilla.gnome.org/show_bug.cgi?id=781161
src/entryArea.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index 2ea8ccb..8c55bf3 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -228,6 +228,9 @@ const EntryArea = new Lang.Class({
this._membersChangedId =
this._room.connect('members-changed',
Lang.bind(this, this._updateCompletions));
+ this._nicknameChangedId =
+ this._room.account.connect('notify::nickname',
+ Lang.bind(this, this._updateNick));
this._channelChangedId =
this._room.connect('notify::channel',
Lang.bind(this, this._onChannelChanged));
@@ -446,6 +449,9 @@ const EntryArea = new Lang.Class({
if (this._selfAliasChangedId)
this._room.channel.connection.disconnect(this._selfAliasChangedId);
this._selfAliasChangedId = 0;
+ if (this._nicknameChangedId)
+ this._room.account.disconnect(this._nicknameChangedId);
+ this._nicknameChangedId = 0;
if (this._channelChangedId)
this._room.disconnect(this._channelChangedId);
this._channelChangedId = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]