forrestguice / NaturalHour

A roman timekeeping add-on for Suntimes.
GNU General Public License v3.0
30 stars 2 forks source link

unable to set alarm for all hours when using "sunset (24)" #21

Closed forrestguice closed 1 year ago

forrestguice commented 1 year ago

Describe the bug Depending on the "Hours Begin" setting, the alarm picker doesn't allow selecting all available hours. When configured to "sunset (24)" it isn't possible to select hours 13-24.

To Reproduce

  1. Natural Hour -> Options -> Hours Begin -> sunset (24)
  2. Natural Hour -> Set Alarm
  3. Slide picker to of the night; the selection is reverted (expected; there are no "night hours" in this mode).
  4. Slide the picker from 1 to 24; the hours stop at 12 so its not possible to select hours 13-24.

This works:

  1. Natural Hour -> Options -> Hours Begin -> sunrise & sunset (12)
  2. Natural Hour -> Set Alarm
  3. Slide picker to of the night; the selection is allowed.
  4. Slide the picker from 1 to 12; all hours can be selected.

This fails:

  1. Natural Hour -> Options -> Hours Begin -> sunset (24)
  2. Suntimes Alarms -> Add Alarm -> Event -> Natural Hour
  3. Add an alarm (any hour)
  4. Natural Hour -> Options -> Hours Begin -> sunrise & sunset (12)
  5. Suntimes Alarms -> Add Alarm -> Event -> Natural Hour
  6. Slide picker to of the night; the selection is immediately switched back to "of the day".

Expected behavior The picker should allow selecting all available hours when configured to "sunset (24)", and should allow toggling the "of the night" when configured to "sunrise & sunset (12)".

Version Info:

Additional context The third example is due to the alarm being previously configured to "sunset (24)". When the picker is launched a second time, the previous alarm (a "sunset (24)" alarm) is automatically selected.