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

Messages marked as read incorrectly for last chat [Pay on 4th May] #2539

Closed
puneetlath opened this issue Apr 22, 2021 · 4 comments · Fixed by #2553
Closed

Messages marked as read incorrectly for last chat [Pay on 4th May] #2539

puneetlath opened this issue Apr 22, 2021 · 4 comments · Fixed by #2553
Assignees
Labels

Comments

@puneetlath
Copy link
Contributor

puneetlath commented Apr 22, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Expected Result:

  1. Send someone a message
  2. Navigate back to the LHN
  3. Don't select a different chat, stay on the LHN
  4. Have the person send you a message back
  5. Their chat row in the LHN gets bolded to indicate it's unread
  6. The row stays bolded until you tap into it

Actual Result:

  1. Send someone a message
  2. Navigate back to the LHN
  3. Don't select a different chat, stay on the LHN
  4. Have the person send you a message back
  5. Notice that their chat row gets bolded momentarily
  6. Then, the chat row automatically gets marked as read, without you tapping on it

This is most likely happening because the app still thinks we are navigated to the last read chat, even though it isn't visible. This is because on some platforms the LHN and chat are visible together and on some platforms they aren't.

Action Performed:

Do the steps above on either the iOS or Android app.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
No.

Platform:

Where is this issue occurring?

iOS
Android
Mobile web

**Version Number: 28-0
**Notes/Photos/Videos:

113329367-531b0800-92d2-11eb-8ebd-003d94f15e63.mp4

**Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/159107

Upwork job: https://www.upwork.com/jobs/~017faab8d92bfc2427
View all open jobs on Upwork

@MelvinBot
Copy link

Triggered auto assignment to @Julesssss (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@parasharrajat
Copy link
Member

parasharrajat commented Apr 22, 2021

Proposal

  1. We update the Last read message here
    https://github.com/Expensify/Expensify.cash/blob/07370d220e9ab02edeb79087381cd13bff5a24ea/src/pages/home/report/ReportActionsView.js#L124-L128

When we move back to Drawer, the last viewed report is not unmounted from the tree thus it receives the Updates and we mark the last read.

  1. We need to put a check for Drawer isDrawerOpen() here so that when the drawer is open we don't mark it read but only on the small screen via isSmallScreenWidth from withWindowDimensions(Drawer is always open on large screens).

@Julesssss
Copy link
Contributor

Thanks, @parasharrajat, the proposal makes sense and seems simple. Please go ahead :)

@Julesssss Julesssss added the Weekly KSv2 label Apr 27, 2021
@Julesssss Julesssss changed the title Messages marked as read incorrectly for last chat Messages marked as read incorrectly for last chat [Pay on 4th May] Apr 27, 2021
@Julesssss Julesssss reopened this Apr 27, 2021
@laurenreidexpensify
Copy link
Contributor

Looks like we skipped payment on this - just issued to Rajat now and closed contract in Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants