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

GH-1971: Replace spring promo with midnight promo in panel #571

Merged
merged 2 commits into from Jun 29, 2020
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

Replace spring promo modal with premium promo modal

  • Loading branch information
benstrumeyer committed Jun 26, 2020
commit a234a72b07295a78b183b21f16a4d28e847028d2
@@ -42,9 +42,9 @@ class PromoModals {
*/
static whichPromoModalShouldWeDisplay() {
// The order is important
// Insights takes priority over Plus
// Insights takes priority over Premium
if (this._isTimeForAPromo(INSIGHTS)) return INSIGHTS;
if (this._isTimeForAPromo(PLUS)) return PLUS;
if (this._isTimeForAPromo(PREMIUM)) return PREMIUM;
return null;
}

@@ -67,9 +67,9 @@ class PromoModals {
static _isTimeForAPromo(type) {
if (conf.notify_promotions === false) { return false; }

const lastSeenPlusPromo = conf[`${PLUS}_${PROMO_MODAL_LAST_SEEN}`];
const lastSeenPremiumPromo = conf[`${PREMIUM}_${PROMO_MODAL_LAST_SEEN}`];
const lastSeenInsightsPromo = conf[`${INSIGHTS}_${PROMO_MODAL_LAST_SEEN}`];
const lastSeenPromo = Math.max(lastSeenPlusPromo, lastSeenInsightsPromo);
const lastSeenPromo = Math.max(lastSeenPremiumPromo, lastSeenInsightsPromo);

if (type === INSIGHTS && !this._hasEngagedFrequently()) {
return false;
ProTip! Use n and p to navigate between commits in a pull request.