mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-07 05:55:26 +01:00
do not remember the reminder used at the previous event
This commit is contained in:
parent
f026c5230b
commit
5310850207
@ -49,14 +49,6 @@ public class Config {
|
||||
mPrefs.edit().putBoolean(Constants.WEEK_NUMBERS, displayWeekNumbers).apply();
|
||||
}
|
||||
|
||||
public int getLastOtherReminderMins() {
|
||||
return mPrefs.getInt(Constants.LAST_OTHER_REMINDER_MINS, 10);
|
||||
}
|
||||
|
||||
public void setLastOtherReminderMins(int lastMins) {
|
||||
mPrefs.edit().putInt(Constants.LAST_OTHER_REMINDER_MINS, lastMins).apply();
|
||||
}
|
||||
|
||||
public int getStoredView() {
|
||||
return mPrefs.getInt(Constants.VIEW, Constants.MONTHLY_VIEW);
|
||||
}
|
||||
|
@ -37,5 +37,4 @@ public class Constants {
|
||||
public static final String REMINDER_MINUTES = "reminder_minutes";
|
||||
public static final String WIDGET_BG_COLOR = "widget_bg_color";
|
||||
public static final String WIDGET_TEXT_COLOR = "widget_text_color";
|
||||
public static final String LAST_OTHER_REMINDER_MINS = "last_other_reminder_mins";
|
||||
}
|
||||
|
@ -90,7 +90,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventsListener {
|
||||
title = resources.getString(R.string.new_event)
|
||||
mEventStartDateTime = Formatter.getDateTimeFromCode(dayCode).withZoneRetainFields(DateTimeZone.getDefault()).withHourOfDay(13)
|
||||
mEventEndDateTime = mEventStartDateTime
|
||||
custom_reminder_value.setText(mConfig.lastOtherReminderMins.toString())
|
||||
}
|
||||
|
||||
private fun setupReminder() {
|
||||
@ -224,14 +223,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventsListener {
|
||||
} else {
|
||||
dbHelper.update(mEvent)
|
||||
}
|
||||
|
||||
saveLastReminderMins()
|
||||
}
|
||||
|
||||
private fun saveLastReminderMins() {
|
||||
if (event_reminder.selectedItemPosition == 2) {
|
||||
mConfig.lastOtherReminderMins = getReminderMinutes()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getReminderMinutes(): Int {
|
||||
|
Loading…
x
Reference in New Issue
Block a user