Handle the 'extension loaded, reopen window' scenario
Not sure exactly how to think about Chrome app lifetimes, so we're being conservative. We only show the full-application loading screen once, on first display of the inbox. FREEBIE
This commit is contained in:
parent
53f2bfbb57
commit
39795170c1
2 changed files with 12 additions and 4 deletions
|
@ -443,7 +443,11 @@
|
||||||
return ConversationController.updateInbox().then(function() {
|
return ConversationController.updateInbox().then(function() {
|
||||||
try {
|
try {
|
||||||
if (self.inboxView) { self.inboxView.remove(); }
|
if (self.inboxView) { self.inboxView.remove(); }
|
||||||
self.inboxView = new Whisper.InboxView({model: self, window: destWindow});
|
self.inboxView = new Whisper.InboxView({
|
||||||
|
model: self,
|
||||||
|
window: destWindow,
|
||||||
|
initialLoadComplete: initialLoadComplete
|
||||||
|
});
|
||||||
self.openConversation(getOpenConversation());
|
self.openConversation(getOpenConversation());
|
||||||
|
|
||||||
return self.inboxView;
|
return self.inboxView;
|
||||||
|
|
|
@ -80,6 +80,8 @@
|
||||||
.addClass(theme);
|
.addClass(theme);
|
||||||
},
|
},
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
this.ready = false;
|
this.ready = false;
|
||||||
this.render();
|
this.render();
|
||||||
this.applyTheme();
|
this.applyTheme();
|
||||||
|
@ -90,9 +92,11 @@
|
||||||
model: { window: options.window }
|
model: { window: options.window }
|
||||||
});
|
});
|
||||||
|
|
||||||
this.appLoadingScreen = new Whisper.AppLoadingScreen();
|
if (!options.initialLoadComplete) {
|
||||||
this.appLoadingScreen.render();
|
this.appLoadingScreen = new Whisper.AppLoadingScreen();
|
||||||
this.appLoadingScreen.$el.prependTo(this.el);
|
this.appLoadingScreen.render();
|
||||||
|
this.appLoadingScreen.$el.prependTo(this.el);
|
||||||
|
}
|
||||||
|
|
||||||
var inboxCollection = getInboxCollection();
|
var inboxCollection = getInboxCollection();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue