From 6ce6e86318eb39dd0ead83a04a9c0981eb76409c Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sun, 9 Feb 2014 19:19:36 +0100 Subject: [PATCH] TelepathyClient: destroy an existing account notification when the user goes offline We already filter new notifications caused by the explicit user action, but we don't do so for changes to existing notifications. https://bugzilla.gnome.org/show_bug.cgi?id=723976 --- js/ui/components/telepathyClient.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index 814e3d9b0..cbe7a18f8 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -1421,7 +1421,12 @@ const AccountNotification = new Lang.Class({ if (status == Tp.ConnectionStatus.CONNECTED) { this.destroy(); } else if (status == Tp.ConnectionStatus.DISCONNECTED) { - this.update(this.title, this._getMessage(account.connection_error)); + let connectionError = account.connection_error; + + if (connectionError == Tp.error_get_dbus_name(Tp.Error.CANCELLED)) + this.destroy(); + else + this.update(this.title, this._getMessage(connectionError)); } })); },