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

Fix MarkerBadge Count #4773

Merged
merged 4 commits into from
Aug 24, 2021
Merged

Fix MarkerBadge Count #4773

merged 4 commits into from
Aug 24, 2021

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Aug 20, 2021

Details

  1. Fixed count issue
  2. Fixes another issue where the marker was setting visible for user's own messages on different devices.

Fixed Issues

$ #4669

Tests QA Steps

  1. Open any conversation in newDot.
  2. Scroll back in the history to see the new Markerbadge when new messages are received.
  3. Send a new message from another device to the correct chat from the other user.
  4. See that the new Marker badge is shown.
  5. Now don't yet interact with the app or marker yet.
  6. Send another message from the other device.
  7. Observe that count.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web | Desktop | Mobile Web

count-marker.mp4

iOS

Android

Screenshot 2021-08-21 05:06:58

@parasharrajat parasharrajat requested a review from a team as a code owner August 20, 2021 23:34
@MelvinBot MelvinBot requested review from roryabraham and removed request for a team August 20, 2021 23:34
@@ -99,6 +99,7 @@ class ReportActionsView extends React.Component {
this.state = {
isLoadingMoreChats: false,
isMarkerActive: false,
unreadActionCount: this.props.report.unreadActionCount,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's great that this state variable shadows the name of the prop. Instead, we should call it localUnreadActionCount or something. And then updateUnreadMessageCount would be updateLocalUnreadActionCount

@@ -199,8 +205,16 @@ class ReportActionsView extends React.Component {
updateLastReadActionID(this.props.reportID);
}

// show new MarkerBadge when there is a new Message
this.toggleMarker();
if (lastAction && (lastAction.actorEmail !== this.props.session.email)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe should use lodashGet for both of these since session can technically be {}:

Suggested change
if (lastAction && (lastAction.actorEmail !== this.props.session.email)) {
if (lodashGet(lastAction, actorEmail, '') !== lodashGet(this.props.session, 'email', '')) {

@parasharrajat
Copy link
Member Author

Updated

@parasharrajat
Copy link
Member Author

@roryabraham I think this is ready to roll.

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @parasharrajat 👏

@roryabraham roryabraham merged commit 8a5cf2d into Expensify:main Aug 24, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@roryabraham
Copy link
Contributor

This was deployed to staging

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.0.88-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@botify
Copy link

botify commented Sep 1, 2021

This has been deployed to production and is now subject to a 7-day regression period.
If no regressions arise, payment will be issued on 2021-09-08. 🎊

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.

4 participants