Fix missing hourglass on some expiring messages

Resolves a race condition between marking messages read and
loading/rendering those messages in the frontend.

Fixes #942
This commit is contained in:
lilia 2016-10-12 10:32:11 +09:00
parent 508c10755b
commit b5f5c4604c

View file

@ -209,6 +209,9 @@
return this.model.fetchContacts().then(function() {
return this.model.fetchMessages().then(function() {
this.$('.bar-container').hide();
this.model.messageCollection.where({unread: 1}).forEach(function(m) {
m.fetch();
});
}.bind(this));
}.bind(this));
// TODO catch?