Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no popup for offer of the week #60

Closed
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

no popup for offer of the week
  • Loading branch information
trickpattyFH20 committed May 14, 2018
commit 290eaa359979f896cf244565d43b8efd8a7a3cc6
@@ -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);
});
}
}
});
});
ProTip! Use n and p to navigate between commits in a pull request.