[Feature request] "Version x.x.x available" notification should never be sent during the night

Open
#3,728 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile

Research direction

Start by locating the VersionCheckerUtilsImpl class and reading triggerCheckVersion and checkVersion to understand how key_last_successful_version_check_timestamp controls the notification. Define the daylight-hours behavior and verify that version notifications are not sent overnight, including appropriate tests for the chosen time boundaries.

Written by the indexing model from the issue text.

Description

enhancement

As a user, I want the "Version x.x.x available" notification to only be sent during daylight hours so that I am not woken up by non-urgent notifications thanks to AAPS being granted the ability to bypass the Do not disturb feature.

Amateur Technical Comment:

I had a quick look at the code, and it seems my key_last_successful_version_check_timestamp value must be set to 1:46am, resulting in me being woken up at that time every night by the notification. If the VersionCheckerUtilsImpl class' triggerCheckVersion method were to be modified to change any non-daylight time values of key_last_successful_version_check_timestamp, that would avoid the checkVersion method being called when the user is typically asleep.

Dominant language
Kotlin
Stars
1.2k
Forks
6.4k
Avg merge
2d 7h
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nightscout/AndroidAPS

All issues in nightscout/AndroidAPS

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.