Improve notification behavior
Only allow one notification at a time. Use a basic notification for normal messages, and image notification for image messages, and a list notification when there are multiple unread messages. // FREEBIE
This commit is contained in:
parent
59313b5177
commit
e8edbe53bc
4 changed files with 133 additions and 27 deletions
|
@ -61,9 +61,20 @@
|
|||
|
||||
return this.get('body');
|
||||
},
|
||||
getNotificationText: function() {
|
||||
var description = this.getDescription();
|
||||
if (description) {
|
||||
return description;
|
||||
}
|
||||
if (this.get('attachments').length > 0) {
|
||||
return 'Media message';
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
updateImageUrl: function() {
|
||||
this.revokeImageUrl();
|
||||
var attachment = message.get('attachments')[0];
|
||||
var attachment = this.get('attachments')[0];
|
||||
if (attachment) {
|
||||
var blob = new Blob([attachment.data], {
|
||||
type: attachment.contentType
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue