mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 16:41:43 +01: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() {
|
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.setSmartWakeup(supportsSmartWakeup() && cbSmartWakeup.isChecked());
|
||||||
alarm.setSnooze(supportsSnoozing() && cbSnooze.isChecked());
|
alarm.setSnooze(supportsSnoozing() && cbSnooze.isChecked());
|
||||||
int repetitionMask = AlarmUtils.createRepetitionMask(cbMonday.isChecked(), cbTuesday.isChecked(), cbWednesday.isChecked(), cbThursday.isChecked(), cbFriday.isChecked(), cbSaturday.isChecked(), cbSunday.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