Skip to content

Commit

Permalink
LIBbb10831 setCurrentDayDialogLaunchTimes(...) fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderLS committed Aug 31, 2018
1 parent b3f1693 commit bf72217
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ private static void setCurrentDayDialogLaunchTimes(final Context context,
final byte currentYear,
final short currentDay,
final short currentDayCount) {
// since 3rd year deletes data for the current day that older than 2 years
if (currentYear > 1) {
for (byte b = 0; b < currentYear - 1; b++) {
dialogLaunchTimes = dialogLaunchTimes.replaceAll(":" + currentDay + "y" + b + "-[0-9][0-9]*:", ":");
}
}
dialogLaunchTimes = dialogLaunchTimes + currentDay + "y" + currentYear + "-" + currentDayCount + ":";
dialogLaunchTimes = dialogLaunchTimes.replaceAll(":" + currentDay + "y" + currentYear + "-[0-9][0-9]*:", ":" + currentDay + "y" + currentYear + "-" + currentDayCount + ":");

getPreferencesEditor(context)
.putString(PREF_KEY_365_DAY_PERIOD_DIALOG_LAUNCH_TIMES, dialogLaunchTimes)
Expand Down

0 comments on commit bf72217

Please sign in to comment.