-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Only update lastMessageText from pusher event from other users #1781
Conversation
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? |
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.
LGTM only have a couple of small comments
src/libs/actions/Report.js
Outdated
|
||
// 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)) { |
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.
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
src/libs/actions/Report.js
Outdated
@@ -257,14 +257,21 @@ function updateReportWithNewAction(reportID, reportAction) { | |||
// Always merge the reportID into Onyx | |||
// 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 = { |
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.
updatedReportObject
?
Works great! 🎉 |
Updated! Tests should run now, hopefully. |
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.
Works well
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.
🎉
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
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