-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
update last read time for empty report task #43665
update last read time for empty report task #43665
Conversation
I'll check the unit test run fail today |
@getusha, I’ve discovered another issue when changing to date comparison. The use case is: User A starts a chat with a new User B. In this case, the lastReadTime for User B is empty and it does not appear bold by Date compare. Therefore, I have switched to my alternative solution, which also covers this issue without causing regression. |
@@ -643,6 +643,13 @@ function ReportScreen({ | |||
}); | |||
}, [isInaccessibleWhisper]); | |||
|
|||
useEffect(() => { | |||
if (!!report.lastReadTime || !ReportUtils.isTaskReport(report)) { |
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.
why did we add !ReportUtils.isTaskReport(report)
? and are you sure we're fixing the root cause?
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.
!ReportUtils.isTaskReport(report)
this condition to make sure only update readNewestAction
for task report to avoid regression
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.
Actually, we can remove the condition !ReportUtils.isTaskReport(report)
. I added this condition to ensure the fix only addresses the scope of this issue and avoids regression.
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.
@suneox it might fix similar issues for different kinds of reports wdyt?
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.
Currently, I don't found another use case the same with this issue
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.
@getusha i think we can go with this change only fix for an use-case task report, to avoid regression
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.
Lets add a comment about the fix
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.
I have added comment explain reason below
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-23.at.1.10.14.in.the.afternoon.movAndroid: mWeb ChromeScreen.Recording.2024-06-23.at.12.30.31.in.the.afternoon.moviOS: NativeScreen.Recording.2024-06-23.at.12.55.15.in.the.afternoon.moviOS: mWeb SafariScreen.Recording.2024-06-23.at.12.32.42.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-06-23.at.12.24.20.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-06-23.at.12.53.49.in.the.afternoon.mov |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
Fixed Issues
$ #42068
PROPOSAL: #42068 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-06-13.at.21.29.57.mov
Android: mWeb Chrome
Screen.Recording.2024-06-13.at.21.27.46.mov
iOS: Native
Screen.Recording.2024-06-13.at.21.25.57.mov
iOS: mWeb Safari
Screen.Recording.2024-06-13.at.21.14.06.mov
MacOS: Chrome / Safari
Screen.Recording.2024-06-13.at.20.50.36.mov
MacOS: Desktop
Screen.Recording.2024-06-13.at.20.55.00.mov