Repository navigation
Show the real notification permission in the examples and add open_notification_settings - #81
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
==========================================
- Coverage 94.52% 94.49% -0.04%
==========================================
Files 45 45
Lines 5937 5974 +37
Branches 61 63 +2
==========================================
+ Hits 5612 5645 +33
- Misses 285 286 +1
- Partials 40 43 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The examples always showed "Allow notifications", even once the permission was granted. Each now reads
permission_statusat start and whenever it comes back to the foreground, offers the button only while a prompt can still change the answer, and shows an "Open Settings" button while notifications are off on iOS, Android, macOS and Windows.That button calls a new public function,
pushups::open_notification_settings(). It opens this app's notification settings: the iOS notification settings URL, Android's app notification settings (the app details screen below Android 8), the macOS Notifications pane, andms-settings:notificationson Windows. It returnsError::Unsupportedon Linux and the web, andError::Platformwhen the device has nothing to open, which an Android test checks by disabling the settings app.The HTML examples now share one look from
examples/support: a status card with the transport, the permission and a shortened token with a Copy button, a card per push with its time, a started-the-app badge and the delivery delay, and a Copy log button on native builds too. winit and tao draw the same status block and a compact line per push. The page padding keeps clear of the iPhone's Dynamic Island.The Android emulator tests now also run on API 24, the module's minSdk. There the UnifiedPush variants are skipped, since ntfy needs Android 8, and APKs are pushed whole before installing, because Android 7 stalled on streamed installs. Every device step in
ci/android/run.shnow has a time bound and prints the screen and the system log when it hangs.On an iPhone, the Tauri example showed the status card and the push cards, and turning notifications off, tapping Open Settings and turning them back on went through as expected. The README screenshots still show the previous UI.