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

register the push token after request has been approved on android #4481

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented Jun 11, 2024

Why

Temporary adjustment for now until we can mark messages read on the server and update the count. This will just decrement the badge count by the number of unread messages in the conversation when you open it.

Far from perfect, but given we're going to actually fix this in earnest in the nearish future, let's just make the badge clear for now and avoid digging too deeply at something that could cause more breaks.

I'm also adding one more fallback for push notification registration given the current expo bug. It shouldn't result in two push notification token registrations, but if it does that's fine too. Better to ensure their token registered right after onboarding.

Test Plan

  • Receive DM notification on Android
  • Open the conversation
  • See the badge has cleared

Copy link

render bot commented Jun 11, 2024

Copy link

github-actions bot commented Jun 11, 2024

Old size New size Diff
7.39 MB 7.39 MB 254 B (0.00%)

@haileyok haileyok marked this pull request as ready for review June 11, 2024 17:03
Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

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

LGTM

@pfrazee pfrazee merged commit fac5f6c into main Jun 11, 2024
6 checks passed
@pfrazee pfrazee deleted the hailey/notifications-dms branch June 11, 2024 17:28
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