Only update lastMessageText from pusher event from other users#1781
Merged
Conversation
Contributor
|
Looks like tests didn't even start when GH Actions was down? I can't seem to manually retrigger them either, maybe you'll need to make a blank commit? |
marcaaron
reviewed
Mar 16, 2021
marcaaron
left a comment
Contributor
There was a problem hiding this comment.
LGTM only have a couple of small comments
|
|
||
| // If the report action from pusher is a higher sequence number than we know about (meaning it has come from | ||
| // a chat participant in another application), then the last message text and author needs to be updated as well | ||
| if (newMaxSequenceNumber > (lastReadSequenceNumbers[reportID] || 0)) { |
Contributor
There was a problem hiding this comment.
NAB, we could maybe do a
const lastReadSequenceNumber = lastReadSequenceNumbers[reportID] || 0;above the const updatedAction = { line and use it here and when calculating the unreadActionCount
| // If the report doesn't exist in Onyx yet, then all the rest of the data will be filled out | ||
| // by handleReportChanged | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, { | ||
| const updatedAction = { |
Contributor
|
Works great! 🎉 |
Contributor
Author
|
Updated! Tests should run now, hopefully. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @marcaaron
Details
This will do a better job of keeping the last comment text in the LHN in sync.
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/157488Tests
You need to have two chat clients running with two different accounts (use incognito or a different platform with a different user logged in)
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android