Update DiscountHelper.java
This commit is contained in:
parent
473425a1a9
commit
0619c13f24
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue