From c2c65baadb8782e1ad0f190b5089fcd004d79873 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 21 Jan 2017 12:39:37 -0500 Subject: [PATCH] remove loadMenuRan check since we should be covered by other checks going forward --- src/background.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/background.js b/src/background.js index 7dd24016fc..c77df2a923 100644 --- a/src/background.js +++ b/src/background.js @@ -28,39 +28,23 @@ chrome.commands.onCommand.addListener(function (command) { } }); -var loadMenuRan = false, - loginToAutoFill = null, +var loginToAutoFill = null, pageDetailsToAutoFill = [], autofillTimeout = null, menuOptionsLoaded = []; chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) { if (msg.command === 'loggedIn' || msg.command === 'unlocked' || msg.command === 'locked') { - if (loadMenuRan) { - return; - } - loadMenuRan = true; - setIcon(); refreshBadgeAndMenu(); } else if (msg.command === 'logout') { logout(msg.expired, function () { - if (loadMenuRan) { - return; - } - loadMenuRan = true; - setIcon(); refreshBadgeAndMenu(); }); } else if (msg.command === 'syncCompleted' && msg.successfully) { - if (loadMenuRan) { - return; - } - loadMenuRan = true; - setTimeout(refreshBadgeAndMenu, 2000); } else if (msg.command === 'bgOpenOverlayPopup') { @@ -88,7 +72,6 @@ chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) { saveAddLogin(sender.tab); } else if (msg.command === 'collectPageDetailsResponse') { - // messageCurrentTab('openNotificationBar', { type: 'add', typeData: null }); if (msg.contentScript) { var forms = autofillService.getFormsWithPasswordFields(msg.details); messageTab(msg.tabId, 'pageDetails', { details: msg.details, forms: forms }); @@ -250,7 +233,7 @@ function refreshBadgeAndMenu() { buildContextMenu(function () { loadMenuAndUpdateBadge(tab.url, tab.id, true); - onUpdatedRan = onReplacedRan = loadMenuRan = false; + onUpdatedRan = onReplacedRan = false; }); }); }