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

Remove AirshipPush.authorizedNotificationSettings MainActor isolation #409

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

tripphillips
Copy link

@tripphillips tripphillips commented Jul 22, 2024

What do these changes do?

Removes unnecessary MainActor isolation of the AirshipPush.authorizedNotificationSettings property. Based on the implementation of AirshipPush.authorizedNotificationSettings there is nothing that should force the property to be MainActor isolated since it only reads and writes to the AirshipPush PreferenceDataStore that uses its own NSRecursiveLock for synchronization. There are AirshipPush properties like authorizationStatus and userPromptedForNotifications that read and write to the AirshipPush PreferenceDataStore without requiring MainActor isolation. These changes will not affect any users who are currently using AirshipPush.authorizedNotificationSettings in a MainActor isolated context.

Why are these changes necessary?

We should prefer to only use MainActor isolation unless it is absolutely necessary.

How did you verify these changes?

The SDK builds and all test cases pass.

@rlepinski
Copy link
Contributor

thanks for the PR!

@rlepinski rlepinski merged commit f5beff1 into urbanairship:main Jul 24, 2024
12 checks passed
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