Skip to content

Commit

Permalink
Changed argument and definition to long type
Browse files Browse the repository at this point in the history
  • Loading branch information
yuna-yano committed Feb 20, 2018
1 parent c11f7a4 commit 4e55df6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/src/main/java/hotchemi/android/rate/AppRate.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public final class AppRate {

private final DialogOptions options = new DialogOptions();

private int installDate = 10;
private long installDate = 10;

private int launchTimes = 10;

private int remindInterval = 1;
private long remindInterval = 1;

private boolean isDebug = false;

Expand All @@ -53,11 +53,11 @@ public static boolean showRateDialogIfMeetsConditions(Activity activity) {
return isMeetsConditions;
}

private static boolean isOverDate(long targetDate, int threshold) {
return new Date().getTime() - targetDate >= (long)threshold * 24 * 60 * 60 * 1000;
private static boolean isOverDate(long targetDate, long threshold) {
return new Date().getTime() - targetDate >= threshold * 24 * 60 * 60 * 1000;
}

public AppRate setLaunchTimes(int launchTimes) {
public AppRate setLaunchTimes(long launchTimes) {
this.launchTimes = launchTimes;
return this;
}
Expand All @@ -67,7 +67,7 @@ public AppRate setInstallDays(int installDate) {
return this;
}

public AppRate setRemindInterval(int remindInterval) {
public AppRate setRemindInterval(long remindInterval) {
this.remindInterval = remindInterval;
return this;
}
Expand Down

0 comments on commit 4e55df6

Please sign in to comment.