messageTray: add an indicatorCount property
This filters out resident and transient notifications in the normal case, but just returns the number of unread messages for the Telepathy implementation. https://bugzilla.gnome.org/show_bug.cgi?id=687787
This commit is contained in:
@ -1153,6 +1153,11 @@ const Source = new Lang.Class({
|
||||
return this.notifications.length;
|
||||
},
|
||||
|
||||
get indicatorCount() {
|
||||
let notifications = this.notifications.filter(function(n) { return !n.isTransient && !n.resident; });
|
||||
return notifications.length;
|
||||
},
|
||||
|
||||
get unseenCount() {
|
||||
return this.notifications.filter(function(n) { return !n.acknowledged; }).length;
|
||||
},
|
||||
|
Reference in New Issue
Block a user