Better handle push notification status. RN Upgrade. #106
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.
Hey @manton,
I've looked at push notifications and tweaked the way the app handles this now.
Push tweaks
When the app loads, it will now use the old behaviour for asking for permission instead of when you go to the Mentions screen. This fixes an issue where the Push Token for the device is not always present, hence we got incorrect states in the toggle.
In addition, it now checks the new push info endpoint to grab all devices for the given
app_name
andpush_env
— this brings back a list of devices and tokens. The app then uses this to see if it's in the list, and show the correct state accordingly.It will still automatically register for push when first logging in as user, but then any changes are preserved.
I think it seems to work nicely. When you register or unregister it will always grab an updated list of devices.
React Native Upgrade
I've update the RN version due to build errors on Android and went from
0.73.9
to0.74.7
— I might do further RN updates in the next releases as we are slowly getting behind.Note that you'll have to do the usual
bun install
andbun pods
for iOS.Android
These changes are already ready to go for Android and we've got an internal test version that seems to work nicely.