AppView.createInbox() - set this.inboxView immediately to be ready
If the 'empty' event is fired between the updateInbox() call and the new InboxView() call afterwards, then the loading screen will never go away. We fix that by immediately creating the InboxView but only adding it to the DOM when the backing data is ready. FREEBIE
This commit is contained in:
parent
e441a662f0
commit
f37af04818
|
@ -59,12 +59,14 @@
|
|||
this.closeInstaller();
|
||||
|
||||
if (!this.inboxView) {
|
||||
return ConversationController.loadPromise().then(function() {
|
||||
// We create the inbox immediately to make sure we're ready to receive the
|
||||
// empty event after getting down to zero messages in the queue.
|
||||
this.inboxView = new Whisper.InboxView({
|
||||
model: self,
|
||||
window: window,
|
||||
initialLoadComplete: options.initialLoadComplete
|
||||
});
|
||||
return ConversationController.loadPromise().then(function() {
|
||||
this.openView(this.inboxView);
|
||||
}.bind(this));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue