fix #65, listen to alarm toggle changes in general, not just clicks

This commit is contained in:
tibbi 2018-07-06 21:37:34 +02:00
parent 545f973d56
commit ea0e2b8230

View File

@ -94,7 +94,7 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
alarm_switch.isChecked = alarm.isEnabled
alarm_switch.setColors(textColor, adjustedPrimaryColor, backgroundColor)
alarm_switch.setOnClickListener {
alarm_switch.setOnCheckedChangeListener { buttonView, isChecked ->
if (alarm.days > 0) {
if (activity.config.wasAlarmWarningShown) {
toggleAlarmInterface.alarmToggled(alarm.id, alarm_switch.isChecked)