Debounce updates to notifications and other events
Wait for one second of silence before displaying new notifications, updating the unread count and conversation list previews. Fixes #470
This commit is contained in:
parent
ca28ba69d6
commit
bb2868f1ec
3 changed files with 12 additions and 8 deletions
|
@ -16,7 +16,8 @@
|
|||
'click': 'select'
|
||||
},
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'change', this.render); // auto update
|
||||
// auto update
|
||||
this.listenTo(this.model, 'change', _.debounce(this.render.bind(this), 1000));
|
||||
this.listenTo(this.model, 'destroy', this.remove); // auto update
|
||||
this.listenTo(this.model, 'opened', this.markSelected); // auto update
|
||||
extension.windows.onClosed(this.stopListening.bind(this));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue