Review: Needs Information

I am not entirely sure how this code fixes the bug. The if loop just calculates 
thew new alarm time when the user re-enables a disabled one-time alarm. By 
removing "checked", it will run for all one-time alarms regardless of whether 
they were enabled/disabled.

Diff comments:

> === modified file 'app/alarm/AlarmDelegate.qml'
> --- app/alarm/AlarmDelegate.qml       2015-08-17 18:28:28 +0000
> +++ app/alarm/AlarmDelegate.qml       2015-10-13 15:07:06 +0000
> @@ -137,11 +137,11 @@
>                  alarmData.enabled = checked
>  
>                  /*
> -                 Calculate the new alarm time if it is a one-time alarm and 
> has
> -                 gone-off and the user is re-enabling the alarm. Repeating
> -                 alarms do this automatically.
> +                 Calculate the alarm time if it is a one-time alarm.
> +                 It is important to keep the alarm list in order of 
> occurence (also for disabled alarms).

What do you mean by keep the alarm list in order of occurence? The alarm list 
ordering is done by the SDK and not the clock app.

> +                 Repeating alarms do this automatically.
>                  */
> -                if(checked && type === Alarm.OneTime) {
> +                if(type === Alarm.OneTime) {
>                      alarmData.daysOfWeek = Alarm.AutoDetect
>                      var now = new Date()
>                      if 
> (alarmData.date.getHours()*60+alarmData.date.getMinutes() <= 
> now.getHours()*60+now.getMinutes()) {


-- 
https://code.launchpad.net/~gang65/ubuntu-clock-app/ubuntu-clock-app-alarm-order-fix/+merge/274270
Your team Ubuntu Clock Developers is subscribed to branch lp:ubuntu-clock-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to