Skip to content

Handle countdown alarm dialogs in-app to prevent app closing (fixes #21)#24

Open
NickASanOS wants to merge 1 commit into
AsteroidOS:2.0from
NickASanOS:fix/alarm-dialog-closes-app
Open

Handle countdown alarm dialogs in-app to prevent app closing (fixes #21)#24
NickASanOS wants to merge 1 commit into
AsteroidOS:2.0from
NickASanOS:fix/alarm-dialog-closes-app

Conversation

@NickASanOS

Copy link
Copy Markdown

When the timer alarm fires, the system launches alarmpresenter (a separate app) to show the alarm dialog. When the user dismisses or repeats the alarm, alarmpresenter closes its window and the compositor returns to the home screen instead of the timer app. The user must manually find and reopen the timer for each use.

This change adds in-app alarm handling using AlarmHandler:

  • Intercepts the countdown alarm before the external alarmpresenter is launched by setting dialogOnScreen = true
  • Shows an in-app overlay with OK and Repeat buttons matching the alarmpresenter design
  • On dismiss: resets the timer to its setup state so another timer can be started immediately
  • On repeat: re-enables the countdown alarm to restart the timer with the same duration
  • Adds haptic feedback (NonGraphicalFeedback) when the alarm fires
  • Disables system gestures during the alarm to prevent accidental dismissal

Fixes #21

alarmpresenter, which would close the timer app after dismissal.

Use AlarmHandler with dialogOnScreen = true to intercept countdown
alarms before the external alarmpresenter is launched. Show an in-app
overlay with OK and Repeat buttons matching the alarmpresenter design.
On dismiss, reset the timer to its setup state so the user can start
another timer immediately without re-opening the app.

Fixes AsteroidOS#21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant