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

Use notification compat to check permission #143

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

evan-masseau
Copy link
Contributor

Description

Just learned about NotificationManagerCompat while investigating something related. It makes for a cleaner more comprehensive check of the notification permission here

@evan-masseau evan-masseau requested a review from a team as a code owner March 12, 2024 17:00
}
return true
}
get() = NotificationManagerCompat.from(Registry.config.applicationContext).areNotificationsEnabled()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was the same property that caused the permission error last summer, sure wish I'd discovered this method then.

@evan-masseau evan-masseau added patch-release For issues or code that should be included in a patch release per semantic versioning guidelines enhancement New feature or request labels Mar 13, 2024
@evan-masseau evan-masseau merged commit 32354c8 into master Mar 14, 2024
2 checks passed
@evan-masseau evan-masseau deleted the ecm/notification-compat branch March 14, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch-release For issues or code that should be included in a patch release per semantic versioning guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants