diff --git a/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java b/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java index bd00812..d142428 100644 --- a/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java +++ b/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java @@ -312,6 +312,8 @@ private static void clearSharedPreferences(Context context) { editor.remove(KEY_INSTALL_DATE); editor.remove(KEY_LAUNCH_TIMES); editor.apply(); + mLaunchTimes = 0; + mInstallDate.setTime(0); } /** @@ -355,10 +357,12 @@ private static void storeInstallDate(final Context context, SharedPreferences.Ed * @param context */ private static void storeAskLaterDate(final Context context) { + long currentTime = System.currentTimeMillis(); SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); Editor editor = pref.edit(); - editor.putLong(KEY_ASK_LATER_DATE, System.currentTimeMillis()); + editor.putLong(KEY_ASK_LATER_DATE, currentTime); editor.apply(); + mAskLaterDate.setTime(currentTime); } /**