Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A number of improvements to notifications #1335

Merged
merged 3 commits into from
May 6, 2024

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Apr 29, 2024

Pull Request Description

This PR adds a number of improvements to the notifications workflow.

  • There is now a second line to the notifications setting subtitle that can help us to identify the current state of things.
    • When using local notifications, it says if we don't have OS permissions. (You could do something similar for APN/iOS.)
    • When using UnifiedPush, we will display whether we were able to find a compatible app or not with the following logic.
      • If no apps are found, a message to that effect is displayed.
      • If we find 1 app, but aren't connected yet, tell the user to restart.
      • If we found more than 1 app, tell the user we don't support that (we would have to present a selector dialog to them, which we can add later).
      • Otherwise, we tell the user what app we are connected to.
  • When the user denies OS notifications, the snackbar now presents an option to navigate to system settings for them to enable it directly (in case they made a mistake).
  • As part of the subtitle when selecting UnifiedPush, suggest and link to ntfy in F-Droid store.
  • Updated the error message for disabling notifications to indicate it's really a problem with the server.
  • I removed the instance name from the UnifiedPush registration. For some reason, with an instance name, I never got any callbacks (onNewEndpoint, onMessage) and getDistributor() always returned null. The registration is still unique to our app, so I hope we don't need the instance feature.

Everything here should be covered in the demos below.

Screenshots / Recordings

OS Permissions Denied

notif-not-allowed.mp4

OS Permissions Redirect

system-settings-redirect.mp4

UnifiedPush Flow

unified-push-flow.mp4

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only briefly took a look at this. I'm fast-tracking this PR (and other notification PRs) so hopefully fix the issues that some have seen with notifications not working!

@hjiangsu hjiangsu merged commit 432ed1d into thunder-app:develop May 6, 2024
1 check passed
@micahmo micahmo deleted the feature/improve-notifications branch May 6, 2024 17:33
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.

2 participants