Clean up references to appWindow
Don't resummon the window when you have a reference to it already. // FREEBIE
This commit is contained in:
parent
a569e34b33
commit
9fcd423e54
1 changed files with 3 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
window.isFocused = function() {
|
window.isFocused = function() {
|
||||||
return inboxFocused;
|
return inboxFocused;
|
||||||
};
|
};
|
||||||
|
@ -47,10 +48,10 @@
|
||||||
minWidth: 600,
|
minWidth: 600,
|
||||||
minHeight: 360
|
minHeight: 360
|
||||||
}, function (windowInfo) {
|
}, function (windowInfo) {
|
||||||
inboxWindowId = windowInfo.id;
|
|
||||||
appWindow = windowInfo;
|
appWindow = windowInfo;
|
||||||
|
inboxWindowId = appWindow.id;
|
||||||
|
|
||||||
windowInfo.onClosed.addListener(function () {
|
appWindow.onClosed.addListener(function () {
|
||||||
inboxOpened = false;
|
inboxOpened = false;
|
||||||
appWindow = null;
|
appWindow = null;
|
||||||
});
|
});
|
||||||
|
@ -81,7 +82,6 @@
|
||||||
var open;
|
var open;
|
||||||
window.openConversation = function(conversation) {
|
window.openConversation = function(conversation) {
|
||||||
if (inboxOpened === true) {
|
if (inboxOpened === true) {
|
||||||
var appWindow = chrome.app.window.get(inboxWindowId);
|
|
||||||
appWindow.contentWindow.openConversation(conversation);
|
appWindow.contentWindow.openConversation(conversation);
|
||||||
} else {
|
} else {
|
||||||
open = conversation;
|
open = conversation;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue