Update DiscountHelper.java

This commit is contained in:
vshcherb 2018-06-20 16:23:49 +03:00 committed by GitHub
parent 71e4f39164
commit 473425a1a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,8 +129,8 @@ public class DiscountHelper {
settings.DISCOUNT_TOTAL_SHOW.set(0);
}
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) {
|| (app.getAppInitializer().getNumberOfStarts() - settings.DISCOUNT_SHOW_NUMBER_OF_STARTS.get() >= showStartFrequency
&& 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);