mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-26 17:21:31 +02:00
Set alarm as used and enabled if time has changed
This commit is contained in:
parent
64c024a5ce
commit
01ef422812
@ -205,6 +205,11 @@ public class AlarmDetails extends AbstractGBActivity {
|
||||
}
|
||||
|
||||
private void updateAlarm() {
|
||||
// Set alarm as used and enabled if time has changed
|
||||
if (alarm.getUnused() && alarm.getHour() != timePicker.getCurrentHour() || alarm.getMinute() != timePicker.getCurrentMinute()) {
|
||||
alarm.setUnused(false);
|
||||
alarm.setEnabled(true);
|
||||
}
|
||||
alarm.setSmartWakeup(supportsSmartWakeup() && cbSmartWakeup.isChecked());
|
||||
alarm.setSnooze(supportsSnoozing() && cbSnooze.isChecked());
|
||||
int repetitionMask = AlarmUtils.createRepetitionMask(cbMonday.isChecked(), cbTuesday.isChecked(), cbWednesday.isChecked(), cbThursday.isChecked(), cbFriday.isChecked(), cbSaturday.isChecked(), cbSunday.isChecked());
|
||||
|
Loading…
Reference in New Issue
Block a user