-
Notifications
You must be signed in to change notification settings - Fork 901
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃惔] Decrement app badge when opening unread chat #4040
Conversation
haileyok
commented
May 16, 2024
- Decrement the badge when opening a chat from the messages list
- Decrement the badge when opening a chat from a push notification
- Increment the badge every time you receive a notification for a chat
- EXCEPT for if it is the chat you are currently looking at
Your Render PR Server URL is https://social-app-pr-4040.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cp2ntfe3e1ms738sm7j0. |
e5b0a20
to
b303c88
Compare
|
if (convo.unreadCount > 0) { | ||
// We only increment the badge once per conversation, so even if there are multiple unreads | ||
// we only want to decrement by one. | ||
decrementBadgeCount(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're doing markAsRead
within the ConvoProvider
, could be a good spot for this too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah pry good to do there in case you foreground the app directly to the convo page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh okay perfect let me adjust to that, wasn't sure if we did it or the server did it for us.