Fix a couple bind()) issues when getting verified state
FREEBIE
This commit is contained in:
parent
b0dbecb4e2
commit
1d7cbc14fd
1 changed files with 6 additions and 5 deletions
|
@ -106,7 +106,10 @@
|
||||||
this.listenTo(this.model, 'expired', this.onExpired);
|
this.listenTo(this.model, 'expired', this.onExpired);
|
||||||
this.listenTo(this.model.messageCollection, 'expired', this.onExpiredCollection);
|
this.listenTo(this.model.messageCollection, 'expired', this.onExpiredCollection);
|
||||||
|
|
||||||
this.lazyUpdateVerified = _.debounce(this.model.updateVerified, 1000);
|
this.lazyUpdateVerified = _.debounce(
|
||||||
|
this.model.updateVerified.bind(this.model),
|
||||||
|
1000
|
||||||
|
);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
new TimerMenuView({ el: this.$('.timer-menu'), model: this.model });
|
new TimerMenuView({ el: this.$('.timer-menu'), model: this.model });
|
||||||
|
@ -309,12 +312,10 @@
|
||||||
|
|
||||||
onOpened: function() {
|
onOpened: function() {
|
||||||
// TODO: we may want to show a loading dialog until this status fetch
|
// TODO: we may want to show a loading dialog until this status fetch
|
||||||
// and potentially the below message fetch are complete. In the near
|
// and potentially the below message fetch are complete.
|
||||||
// term, just a send block if this statusFetch is incomplete might be
|
|
||||||
// a good idea.
|
|
||||||
this.statusFetch = this.model.getProfiles().then(function() {
|
this.statusFetch = this.model.getProfiles().then(function() {
|
||||||
this.model.updateVerified().then(function() {
|
this.model.updateVerified().then(function() {
|
||||||
this.onVerifiedChange.bind(this);
|
this.onVerifiedChange();
|
||||||
this.statusFetch = null;
|
this.statusFetch = null;
|
||||||
console.log('done with status fetch');
|
console.log('done with status fetch');
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
Loading…
Add table
Reference in a new issue