Chat - Incorrect number of new messages are shown in green marker badge count
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue found when executing PR #4773
Action Performed:
- Lunch the app
- Log in with account A in device 1
- Select user you will chat and scroll the chat to 10-30 messages to top
- Back to LHN
- Log in with account B in device 2
- Send 13 messages to account A from device 2
- Back to conversation from LHN in device 1 and check the green Marker Badge Count
Expected Result:
I expected to see the same number of messages sent from device 2
Actual Result:
Gives some random number shows as new message count
Workaround:
Unknown
Platform:
Where is this issue occurring?
- iOS
- Android
- mWeb
Version Number: 1.0.88-0 Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/131014149-e82d87b6-5d77-4477-abeb-36aeea466742.mp4
Expensify/Expensify Issue URL:
:wave: Friendly reminder that deploy blockers are time-sensitive β± issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Triggered auto assignment to @alex-mechler (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
I was able to reproduce on staging only, will look into what might be causing this π
Definitely related to https://github.com/Expensify/App/pull/4773. Specifically, this is the offending line. When the LHN is opened, the unread count follows the 1+2+3...+n formula for the badge it shows. When I send 2 messages, the unread is 3, and 3 messages leads to an unread count of 6. When the report is opened, the unread count is correct.
cc @parasharrajat
Good catch @alex-mechler. I guess I forgot to check for the case where LHN is opened. In this case, we should save the unread message count instead of adding it to the old count.
Sending the PR shortly.
Awesome, thanks! Will assign you to this then!
Sorry for missing this in my PR review! Thanks for figuring this out @alex-mechler
Retested this on Android and it was a pass π Removing the deploy blocker label.
I can't close this issue but cc: @roryabraham
Issue not reproducible during KI retests (FIxed)
π Deployed to staging by @roryabraham in version: 1.0.88-3 π
| platform | result |
|---|---|
| π€ android π€ | cancelled πͺ |
| π₯ desktop π₯ | cancelled πͺ |
| π iOS π | cancelled πͺ |
| πΈ web πΈ | success β |
π Deployed to production by @roryabraham in version: 1.0.88-2 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | failure β |
| πΈ web πΈ | success β |
π Deployed to production by @roryabraham in version: 1.0.90-2 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | failure β |
| πΈ web πΈ | success β |