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 #61

Merged
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Next
no popup for offer of the week
fix typo
  • Loading branch information
trickpattyFH20 committed May 14, 2018
commit 4a4d978cbae959882e8be0fefcd46f09f16d81ce
@@ -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 (msg.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.