-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix unread marker displayed consistently on chat after creating new expense and switching reports #61867
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 unread marker displayed consistently on chat after creating new expense and switching reports #61867
Conversation
@rohit9625 perf tests are failing |
What could be the reason, because I ran the unit tests and all were passing? |
Hey @lakchote, can I run perf-tests locally? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: HybridApp03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
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.
I guess one more review is required from @lakchote. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Explanation of Change
Expense Report
action, move to another screen, and navigate back then theunread marker
is showing consistently above the recently createdExpense Report
action.report.lastReadTime
was not updated after updating theExpense Report
to the backend.unreadMarkerTime
was updated withlastAction.created
when creatingExpense
andmarker
was not shown when creatingExpense
.unread marker
after switching reports because theunreadMarkerTime
was initialized withreport.lastReadTime
which wasn't updated correctly.We already have
useEffects
to update thereport.lastReadTime
by calling thereadNewestAction
function. So, I refactor anif-condition
to check if thelast created action
is unread or not. If unread then update thelastReadTime
.Fixed Issues
$ #58673
PROPOSAL: #58673 (comment)
Tests
Offline tests
Same as Tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)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
Android_App.mov
Android: mWeb Chrome
mWeb_Android.mov
iOS: Native
iOS_App.mov
iOS: mWeb Safari
mWeb_iOS.mov
MacOS: Chrome / Safari
Mac_Safari.mov
MacOS: Desktop
Mac_Desktop_App.mov