[polari] app: Reset nick on startup
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] app: Reset nick on startup
- Date: Mon, 10 Apr 2017 22:40:41 +0000 (UTC)
commit 1183b791ecec85e1363cedeab23c2ab4aff6c57f
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Mar 24 11:33:14 2017 +0100
app: Reset nick on startup
Telepathy will remember the last used nickname and restore it when an
account gets connected. While not necessarily wrong, this conflicts
with us treating the nickname set from the popover as a temporary
change in contrast to the nickname configured in the properties,
so for us it makes more sense to reset the nickname at startup to
make sure it matches the configured one we are using to connect.
https://bugzilla.gnome.org/show_bug.cgi?id=781161
src/application.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index d1d9d89..734ca48 100644
--- a/src/application.js
+++ b/src/application.js
@@ -235,6 +235,13 @@ const Application = new Lang.Class({
this._accountsMonitor.connect('account-status-changed',
Lang.bind(this, this._onAccountStatusChanged));
+ this._accountsMonitor.connect('account-added', (am, account) => {
+ // Reset nickname at startup
+ let accountName = this._getTrimmedAccountName(account);
+ account.set_nickname_async(accountName, (a, res) => {
+ a.set_nickname_finish(res);
+ });
+ });
this.pasteManager = new PasteManager.PasteManager();
this.notificationQueue = new AppNotifications.NotificationQueue();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]