fix: empty background when invited to private chat#58543
Conversation
|
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I'll review later today |
| if (prevReportActions.length !== 0 || reportActions.length === 0) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
If we use OR condition here, fetchReport will be constantly called when reportActions changes, meanwhile we only want to fix the case when user was first invited to the room. This code looks different compared to the proposal that you proposed. Is there any reason for that?
There was a problem hiding this comment.
In the proposal I used direct condition, where if prevReportActions.length === 0 && reportActions.length > 0 then we call fetchReport. In the PR, I use inverse condition to early return as it is our codebase convention.
If we use OR condition here, fetchReport will be constantly called when reportActions changes
I don't think this change creates this behavior, because we return everytime prevReportActions have lengh. Can you check again please?
There was a problem hiding this comment.
Ty. I don't know why I read it as prevReportActions.length == 0 at first 😳
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-20.at.14.14.11.movAndroid: mWeb ChromeScreen.Recording.2025-03-20.at.13.33.25.mp4iOS: NativeScreen.Recording.2025-03-20.at.13.38.01.moviOS: mWeb SafariScreen.Recording.2025-03-20.at.13.25.32.movMacOS: Chrome / SafariScreen.Recording.2025-03-20.at.13.25.32.movMacOS: DesktopScreen.Recording.2025-03-20.at.14.30.10.movScreen.Recording.2025-03-20.at.13.25.32.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 staging by https://github.com/techievivek in version: 9.1.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.1.17-1 🚀
|
Explanation of Change
Fixed Issues
$ #57769
PROPOSAL: #57769 (comment)
Tests
Precondition: User A and B logged in on two different devices
Offline tests
QA Steps
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
Screen.Recording.2025-03-17.at.21.28.10.mp4
Android: mWeb Chrome
Screen.Recording.2025-03-17.at.21.29.58.mp4
iOS: Native
Screen.Recording.2025-03-17.at.21.32.37.mp4
iOS: mWeb Safari
Screen.Recording.2025-03-17.at.21.37.04.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-03-17.at.10.51.13.mov
MacOS: Desktop
Screen.Recording.2025-03-17.at.21.42.18.mp4