diff --git a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java index fd6b9e6a06..2a08a4ee5e 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java @@ -128,9 +128,10 @@ public class DiscountHelper { if (discountChanged) { settings.DISCOUNT_TOTAL_SHOW.set(0); } + // show after every N (getNumberOfStarts()) starts or show after every N (double show_day_frequency) frequency if (discountChanged || (app.getAppInitializer().getNumberOfStarts() - settings.DISCOUNT_SHOW_NUMBER_OF_STARTS.get() >= showStartFrequency - && System.currentTimeMillis() - settings.DISCOUNT_SHOW_DATETIME_MS.get() > 1000L * 60 * 60 * 24 * showDayFrequency) ) { + || System.currentTimeMillis() - settings.DISCOUNT_SHOW_DATETIME_MS.get() > 1000L * 60 * 60 * 24 * showDayFrequency) ) { if(settings.DISCOUNT_TOTAL_SHOW.get() < maxTotalShow){ settings.DISCOUNT_ID.set(discountId); settings.DISCOUNT_TOTAL_SHOW.set(settings.DISCOUNT_TOTAL_SHOW.get() + 1);