Remove a call to getReportNameValuePairs when checking if a thread is disabled#63607
Conversation
| * `private` - Anybody can leave (though you can only be invited to join) | ||
| * `invoice` - Invoice sender, invoice receiver and auto-invited admins cannot leave | ||
| */ | ||
| function canLeaveRoom(report: OnyxEntry<Report>, isPolicyEmployee: boolean): boolean { |
There was a problem hiding this comment.
This function was not being referenced anywhere, so I just removed it.
| expect(shouldDisableThread(reportAction, reportID, false)).toBeTruthy(); | ||
| }); | ||
|
|
||
| it('should disable on deleted and not-thread actions', () => { |
There was a problem hiding this comment.
I refactored this test to be more explicit, like the new archived tests
| expect(shouldDisableThread(reportAction, reportID, false)).toBeTruthy(); | ||
| }); | ||
|
|
||
| it('should disable on archived reports and not-thread actions', () => { |
There was a problem hiding this comment.
This was a bad test because it wasn't actually testing archived reports. Archived reports would have required doing something with the report NVPs, not the status or state.
Then, the test is really only testing the childVisibleActionCount, which isn't great.
However, since the report wasn't actually archived, the logic falls into the same path as deleted threads since reportAction is missing the message property.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-06-06.at.3.03.53.AM.movAndroid: mWeb ChromeScreen.Recording.2025-06-06.at.3.11.33.AM.movUploading Screen Recording 2025-06-06 at 3.11.33 AM.mov… iOS: HybridAppScreen.Recording.2025-06-06.at.2.39.06.AM.moviOS: mWeb SafariScreen.Recording.2025-06-06.at.2.37.18.AM.movMacOS: Chrome / SafariScreen.Recording.2025-06-06.at.2.30.34.AM.movMacOS: DesktopScreen.Recording.2025-06-06.at.3.18.57.AM-1.mov |
|
🎯 @ishpaul777, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #63610. |
|
✋ 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/blimpich in version: 9.1.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.1.63-6 🚀
|
Explanation of Change
The call to
getReportNameValuePairs()was removed, which required passingisArchivedReportthrough the params.Fixed Issues
Part of #59961
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop