This commit is contained in:
veliymolfar 2020-01-17 16:49:28 +02:00
parent 6db7ffff3d
commit 8bb06e8d64

View file

@ -19,7 +19,7 @@ import net.osmand.plus.base.BottomSheetDialogFragment;
public class RateUsBottomSheetDialog extends BottomSheetDialogFragment {
private static long sixtyDays = 60 * 24 * 60 * 60 * 1000L;
private static final long SIXTY_DAYS = 60 * 24 * 60 * 60 * 1000L;
private RateUsBottomSheetDialog.FragmentState state = RateUsBottomSheetDialog.FragmentState.INITIAL_STATE;
@Nullable
@Override
@ -59,7 +59,7 @@ public class RateUsBottomSheetDialog extends BottomSheetDialogFragment {
int startsOnDislikeMoment = settings.NUMBER_OF_APP_STARTS_ON_DISLIKE_MOMENT.get();
long lastDisplayTimeInMillis = settings.LAST_DISPLAY_TIME.get();
long currentTime = System.currentTimeMillis();
return currentTime - lastDisplayTimeInMillis > sixtyDays
return currentTime - lastDisplayTimeInMillis > SIXTY_DAYS
&& numberOfStarts - startsOnDislikeMoment > 50;
}
return false;