Remove refs to appWindow
We only need the regular window, not the AppWindow interface, which is specific to chrome apps.
This commit is contained in:
parent
9da4cdefd7
commit
674eeb8313
3 changed files with 25 additions and 27 deletions
32
js/index.js
32
js/index.js
|
@ -19,23 +19,21 @@
|
|||
|
||||
function render() {
|
||||
extension.windows.getBackground(function(bg) {
|
||||
extension.windows.getCurrent(function(appWindow) {
|
||||
bg.ConversationController.updateInbox().then(function() {
|
||||
try {
|
||||
if (view) { view.remove(); }
|
||||
var $body = bg.$('body',document).empty();
|
||||
view = new bg.Whisper.InboxView({appWindow: appWindow});
|
||||
view.$el.prependTo($body);
|
||||
window.openConversation = function(conversation) {
|
||||
if (conversation) {
|
||||
view.openConversation(null, conversation);
|
||||
}
|
||||
};
|
||||
openConversation(bg.getOpenConversation());
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
}
|
||||
});
|
||||
bg.ConversationController.updateInbox().then(function() {
|
||||
try {
|
||||
if (view) { view.remove(); }
|
||||
var $body = bg.$('body',document).empty();
|
||||
view = new bg.Whisper.InboxView({window: window});
|
||||
view.$el.prependTo($body);
|
||||
window.openConversation = function(conversation) {
|
||||
if (conversation) {
|
||||
view.openConversation(null, conversation);
|
||||
}
|
||||
};
|
||||
openConversation(bg.getOpenConversation());
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue