-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: Status message not cleared #53810
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemobile-chrome.moviOS: Nativeios.moviOS: mWeb Safarimobile-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@eh2077 i updated, please check again |
@rlinoz No, it doesn’t work from my end. I tested on production iOS app and the Web, the expired status is not cleared even if I reopen the App or refresh the page. |
const currentTime = format(new Date(), 'yyyy-MM-dd HH:mm:ss'); | ||
if (!currentUserPersonalDetails.status?.clearAfter) { | ||
return; | ||
} | ||
if (new Date(currentUserPersonalDetails.status?.clearAfter).getTime() > new Date(currentTime).getTime()) { | ||
const subMilisecondsTime = new Date(currentUserPersonalDetails.status?.clearAfter).getTime() - new Date(currentTime).getTime(); |
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 think we can make the code cleaner like
if (!currentUserPersonalDetails.status?.clearAfter) {
return;
}
const currentTime = new Date();
const clearAfterTime = new Date(currentUserPersonalDetails.status.clearAfter);
if (isNaN(clearAfterTime.getTime())) {
return;
}
const timeDifference = clearAfterTime.getTime() - currentTime.getTime();
if (subMilisecondsTime > 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.
@eh2077 i updated
@eh2077 interesting, when I set it up to clear after 2 minutes or so it works, can you share the steps you are taking please? |
@rlinoz Below are recordings from my devices 0-ios.mp40-web.mp4expired_status_is_not_clear_after_refresh_page.mov |
@nkdengineer There're conflicts need to be resolved. |
@eh2077 i resolved |
friendly bump @eh2077 |
I'll update tmr |
@nkdengineer After the status is cleared, the default option of ![]() If reopen it, then the default option changes to Screen.Recording.2025-01-07.at.12.50.53.AM.mov |
@nkdengineer bump on the above |
Will give an update soon |
@eh2077 i fixed |
@nkdengineer Can you please fix the lint check? |
User.updateDraftCustomStatus({ | ||
text: '', | ||
emojiCode: '', | ||
clearAfter: '', | ||
}); |
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.
User.updateDraftCustomStatus({ | |
text: '', | |
emojiCode: '', | |
clearAfter: '', | |
}); | |
User.clearDraftCustomStatus(); |
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.
@eh2077 we need to add empty string value here to reset the value

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.
@nkdengineer I suggested replacing the update method with the clear draft method. Can you check it again?
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.
ohh, i updated, thanks @eh2077
@nkdengineer Please help to fix the lint check and address the minor comment, thank you! |
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!
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.
Thanks!
✋ 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 staging by https://github.com/rlinoz in version: 9.0.85-0 🚀
|
3 similar comments
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.0.85-0 🚀
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.0.85-0 🚀
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.0.85-0 🚀
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.0.85-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.85-4 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.85-4 🚀
|
Explanation of Change
Fixed Issues
$ #53518
PROPOSAL: #53518 (comment)
Tests
Offline tests
same as above
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
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.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov