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.
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) {|
@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.
| User.updateDraftCustomStatus({ | |
| text: '', | |
| emojiCode: '', | |
| clearAfter: '', | |
| }); | |
| User.clearDraftCustomStatus(); |
There was a problem hiding this comment.
@eh2077 we need to add empty string value here to reset the value
There was a problem hiding this comment.
@nkdengineer I suggested replacing the update method with the clear draft method. Can you check it again?
|
@nkdengineer Please help to fix the lint check and address the minor comment, thank you! |
|
✋ 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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