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:
parent
8fb2263471
commit
bdbea2463b
@ -640,6 +640,10 @@ const ChatSource = new Lang.Class({
|
||||
return this._pendingMessages.length;
|
||||
},
|
||||
|
||||
get indicatorCount() {
|
||||
return this.count;
|
||||
},
|
||||
|
||||
get unseenCount() {
|
||||
return this.count;
|
||||
},
|
||||
|
@ -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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user