Skip to main content

Module notifications

Module notifications 

Source

Functions§

ensure_permission_requested
Ensure the OS notification authorization has been requested at least once so scheduled break / pre-break / screen-time banners actually surface. Queries the current permission, and only on an undetermined state does it raise the request (which shows the macOS authorization dialog and registers the app with the notification centre).
should_request_notification_permission
Whether the app must call request_permission() for the current notification permission state before any .show() will surface a banner.