1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-19 11:30:44 +02:00

Always check smart wakeup if forced

This commit is contained in:
Martin.JM 2024-02-18 18:55:54 +01:00
parent 89b6ae9f24
commit 275b662188

View File

@ -125,11 +125,11 @@ public class AlarmDetails extends AbstractGBActivity {
timePicker.setCurrentHour(alarm.getHour());
timePicker.setCurrentMinute(alarm.getMinute());
cbSmartWakeup.setChecked(alarm.getSmartWakeup());
boolean smartAlarmForced = forcedSmartWakeup(alarm.getPosition());
cbSmartWakeup.setChecked(alarm.getSmartWakeup() || smartAlarmForced);
int smartAlarmVisibility = supportsSmartWakeup(alarm.getPosition()) ? View.VISIBLE : View.GONE;
cbSmartWakeup.setVisibility(smartAlarmVisibility);
boolean smartAlarmEnabled = !forcedSmartWakeup(alarm.getPosition());
cbSmartWakeup.setEnabled(smartAlarmEnabled);
cbSmartWakeup.setEnabled(!smartAlarmForced);
cbSnooze.setChecked(alarm.getSnooze());
int snoozeVisibility = supportsSnoozing() ? View.VISIBLE : View.GONE;