set reminder to AT_START if its custom with 0 minutes

This commit is contained in:
tibbi 2016-11-02 21:24:24 +01:00
parent 4e266c6f4f
commit 7c93edb2c3
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,9 @@ public class Config {
}
public void setDefaultReminderType(int type) {
if (type == Constants.REMINDER_CUSTOM && getDefaultReminderMinutes() == 0)
type = Constants.REMINDER_AT_START;
mPrefs.edit().putInt(Constants.REMINDER_TYPE, type).apply();
}

View File

@ -87,7 +87,9 @@ class SettingsActivity : SimpleActivity() {
2 -> Constants.DAY_MINS
else -> 1
}
mConfig.defaultReminderMinutes = Integer.valueOf(value) * multiplier
mConfig.defaultReminderType = Constants.REMINDER_CUSTOM
toast(R.string.reminder_saved)
hideKeyboard()
}