Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public void onCancel(DialogInterface dialog) {
}
clearSharedPreferences(context);
storeAskLaterDate(context);
storeAskLaterDate(context);
}
});
builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
Expand All @@ -311,6 +312,7 @@ private static void clearSharedPreferences(Context context) {
Editor editor = pref.edit();
editor.remove(KEY_INSTALL_DATE);
editor.remove(KEY_LAUNCH_TIMES);
editor.remove(KEY_OPT_OUT);
editor.apply();
}

Expand Down Expand Up @@ -360,6 +362,17 @@ private static void storeAskLaterDate(final Context context) {
editor.putLong(KEY_ASK_LATER_DATE, System.currentTimeMillis());
editor.apply();
}

/**
* Store the date the user asked for being asked again later.
* @param context
*/
private static void storeAskLaterTimes(final Context context) {
SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
Editor editor = pref.edit();
editor.putInt(KEY_LAUNCH_TIMES, 0);
editor.apply();
}

/**
* Print values in SharedPreferences (used for debug)
Expand Down