implemented Notification Center

This commit is contained in:
Jeena Paradies 2012-11-10 01:17:52 +01:00
parent d8683ed9d5
commit 9bcba0beae
4 changed files with 48 additions and 4 deletions

View file

@ -19,13 +19,23 @@ function(HostApp, Timeline) {
Mentions.prototype = Object.create(Timeline.prototype);
Mentions.prototype.newStatus = function(status) {
Mentions.prototype.newStatus = function(statuses) {
Timeline.prototype.newStatus.call(this, status);
Timeline.prototype.newStatus.call(this, statuses);
if(this.is_not_init) {
this.unread_mentions += status.length;
this.unread_mentions += statuses.length;
HostApp.unreadMentions(this.unread_mentions);
for (var i = 0; i < statuses.length; i++) {
var status = statuses[i];
var name;
if(this.followings.followings[status.entity]) {
name = this.followings.followings[status.entity].profile["https://tent.io/types/info/basic/v0.1.0"].name;
}
HostApp.notificateUserAboutMention(status.content.text, name || status.entity, status.id, status.entity);
};
}
this.is_not_init = true;