Bug 1259729 fix attaching pocket styles on startup, r=jaws a=lizzard

MozReview-Commit-ID: 3guFW0BVhwO
This commit is contained in:
Shane Caraveo 2016-04-01 08:39:48 -07:00
parent ca2461ef88
commit 73163ab74e

View File

@ -381,12 +381,8 @@ var PocketOverlay = {
CreatePocketWidget(reason);
PocketContextMenu.init();
if (reason != APP_STARTUP) {
for (let win of allBrowserWindows()) {
this.setWindowScripts(win);
this.addStyles(win);
this.updateWindow(win);
}
for (let win of allBrowserWindows()) {
this.onWindowOpened(win);
}
},
shutdown: function(reason) {
@ -412,6 +408,8 @@ var PocketOverlay = {
PocketReader.shutdown();
},
onWindowOpened: function(window) {
if (window.hasOwnProperty("pktUI"))
return;
this.setWindowScripts(window);
this.addStyles(window);
this.updateWindow(window);