[gnome-shell] message-tray: Move check for _actorDestroyed into _setCount()
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] message-tray: Move check for _actorDestroyed into _setCount()
- Date: Wed, 13 Jul 2011 20:27:34 +0000 (UTC)
commit a92b7342bac452f84937d9d667e4145faddb381e
Author: Florian MÃllner <fmuellner gnome org>
Date: Wed Jul 13 22:23:03 2011 +0200
message-tray: Move check for _actorDestroyed into _setCount()
As _updateCount has been designed to be overwritable by subclasses,
move the check for _actorDestroyed into _setCount(), to fix the
problem described in commit 5f6ac33d5 in derived types as well.
js/ui/messageTray.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index bf72a0f..41475c1 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -949,14 +949,14 @@ Source.prototype = {
if (isNaN(parseInt(count)))
throw new Error("Invalid notification count: " + count);
+ if (this._actorDestroyed)
+ return;
+
this._counterBin.visible = visible;
this._counterLabel.set_text(count.toString());
},
_updateCount: function() {
- if (this._actorDestroyed)
- return;
-
let count = this.notifications.length;
this._setCount(count, count > 1);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]