From 290eaa359979f896cf244565d43b8efd8a7a3cc6 Mon Sep 17 00:00:00 2001 From: Patrick Lawler Date: Mon, 14 May 2018 17:34:40 -0400 Subject: [PATCH] no popup for offer of the week --- src/background.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/background.js b/src/background.js index 53b6f2516..c26602962 100644 --- a/src/background.js +++ b/src/background.js @@ -1104,20 +1104,23 @@ messageCenter.on('enabled', () => { if (msg.origin === 'offers-core' && msg.type === 'push-offer' && msg.data.offer_data) { + log('RECEIVED OFFER', msg); + const unreadIdx = rewards.unreadOfferIds.indexOf(msg.data.offer_id); if (unreadIdx !== -1) { rewards.unreadOfferIds.splice(unreadIdx, 1); } rewards.storedOffers[msg.data.offer_id] = msg.data; rewards.unreadOfferIds.push(msg.data.offer_id); - - log('RECEIVED OFFER', msg); button.update(); - utils.getActiveTab((tab) => { - let tabId = 0; - if (tab) tabId = tab.id; - rewards.showHotDog(tabId, msg.data); - }); + + if (msgs.data.offer_data.ui_info.notif_type !== 'star') { + utils.getActiveTab((tab) => { + let tabId = 0; + if (tab) tabId = tab.id; + rewards.showHotDog(tabId, msg.data); + }); + } } }); });