Show last seen indicator for keychange/verification notifications
FREEBIE
This commit is contained in:
parent
1fedc75e5d
commit
5b46ef3562
2 changed files with 34 additions and 15 deletions
|
@ -247,7 +247,8 @@
|
|||
type : 'keychange',
|
||||
sent_at : this.get('timestamp'),
|
||||
received_at : timestamp,
|
||||
key_changed : id
|
||||
key_changed : id,
|
||||
unread : 1
|
||||
});
|
||||
message.save().then(this.trigger.bind(this,'newmessage', message));
|
||||
},
|
||||
|
@ -265,7 +266,8 @@
|
|||
received_at : timestamp,
|
||||
verifiedChanged : id,
|
||||
verified : verified,
|
||||
local : options.local
|
||||
local : options.local,
|
||||
unread : 1
|
||||
});
|
||||
message.save().then(this.trigger.bind(this,'newmessage', message));
|
||||
|
||||
|
@ -548,6 +550,14 @@
|
|||
};
|
||||
}.bind(this));
|
||||
|
||||
// Some messages we're marking read are local notifications with no sender
|
||||
read = _.filter(read, function(m) {
|
||||
return Boolean(m.sender);
|
||||
});
|
||||
unreadMessages = unreadMessages.filter(function(m) {
|
||||
return Boolean(m.get('sender'));
|
||||
});
|
||||
|
||||
var unreadCount = unreadMessages.length - read.length;
|
||||
this.save({ unreadCount: unreadCount });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue