Skip to content

Commit

Permalink
Remove onboarding icon. (mozilla-services#3542)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Nov 9, 2017
1 parent 00192a8 commit 00f0409
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
3 changes: 0 additions & 3 deletions addon/webextension/background/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ this.main = (function() {

function setIconActive(active, tabId) {
let path = active ? "icons/icon-highlight-32-v2.svg" : "icons/icon-32-v2.svg";
if ((!hasSeenOnboarding) && !active) {
path = "icons/icon-starred-32-v2.svg";
}
startBackground.photonPageActionPort.postMessage({
type: "setProperties",
iconPath: path
Expand Down
20 changes: 1 addition & 19 deletions addon/webextension/background/startBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,6 @@ this.startBackground = (function() {
});
});

// Note this duplicates functionality in main.js, but we need to change
// the onboarding icon before main.js loads up
let iconPath = null;
browser.storage.local.get(["hasSeenOnboarding"]).then((result) => {
let hasSeenOnboarding = !!result.hasSeenOnboarding;
if (!hasSeenOnboarding) {
iconPath = "icons/icon-starred-32-v2.svg";
if (photonPageActionPort) {
photonPageActionPort.postMessage({
type: "setProperties",
iconPath
});
}
}
}).catch((error) => {
console.error("Error loading Screenshots onboarding flag:", error);
});

browser.runtime.onMessage.addListener((req, sender, sendResponse) => {
loadIfNecessary().then(() => {
return communication.onMessage(req, sender, sendResponse);
Expand Down Expand Up @@ -150,7 +132,7 @@ this.startBackground = (function() {
photonPageActionPort.postMessage({
type: "setProperties",
title: browser.i18n.getMessage("contextMenuLabel"),
iconPath
iconPath: "icons/icon-starred-32-v2.svg"
});

// Export these so that main.js can use them.
Expand Down
1 change: 0 additions & 1 deletion addon/webextension/icons/icon-starred-32-v2.svg

This file was deleted.

0 comments on commit 00f0409

Please # to comment.