Skip to content

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

@forrestguice

Description

@forrestguice

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:

  • NaturalHour Version: v0.2.0
  • Suntimes Version: v0.14.11
  • Android Version: 12
  • Device Model: emulator

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions