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

ui: deliver health notifications to user #426

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

agottardo
Copy link
Contributor

@agottardo agottardo commented Jun 19, 2024

This PR adds support for notifying the user when health warnings are sent down coming from LocalAPI. We remove duplicates and debounce updates; then deliver a notification for each health warning are they are sent down. Just like on macOS, notifications are removed when a Warnable becomes healthy again.

Notifications are delivered on a separate notification channel, so they can be disabled if needed.

@agottardo agottardo force-pushed the angott/health-notifications branch 3 times, most recently from 2edc4a3 to f28ff67 Compare June 19, 2024 17:44
Copy link
Member

@barnstar barnstar left a comment

Choose a reason for hiding this comment

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

Noted a couple of stylistic changes to clean things up a bit, but logically this looks great.

}

addedWarnings.add(warning.WarnableCode)
if (this.currentWarnings.contains(warning.WarnableCode)) {
Copy link
Member

Choose a reason for hiding this comment

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

A when clause would be more kotlin-esque here.

android/src/main/java/com/tailscale/ipn/App.kt Outdated Show resolved Hide resolved
android/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
Updates tailscale/tailscale#4136

This PR adds support for notifying the user when health warnings are sent down coming from LocalAPI. We remove duplicates and debounce updates; then deliver a notification for each health warning are they are sent down. Just like on macOS, notifications are removed when a Warnable becomes healthy again.

Notifications are delivered on a separate notification channel, so they can be disabled if needed.

Signed-off-by: Andrea Gottardo <[email protected]>
@agottardo agottardo force-pushed the angott/health-notifications branch from f28ff67 to 6144e53 Compare June 19, 2024 18:50
@agottardo agottardo merged commit ea928ca into main Jun 19, 2024
4 checks passed
@agottardo agottardo deleted the angott/health-notifications branch June 19, 2024 19: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
2 participants