Fix workspace list doesn't get updated unless user opens workspace chat#47958
Conversation
|
@rayane-djouah 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-30.at.7.08.06.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-30.at.4.32.47.PM.moviOS: NativeScreen.Recording.2024-08-30.at.7.09.10.PM.moviOS: mWeb SafariScreen.Recording.2024-08-30.at.4.34.13.PM.movMacOS: Chrome / SafariScreen.Recording.2024-08-30.at.4.30.48.PM.movMacOS: DesktopScreen.Recording.2024-08-30.at.7.11.02.PM.mov |
| * updating the screen. Passing the offline status from the component. | ||
| */ | ||
| function shouldShowPolicy(policy: OnyxEntry<Policy>, isOffline: boolean): boolean { | ||
| function shouldShowPolicy(policy: OnyxEntry<Policy>, isOffline: boolean, currentUserLogin: string | undefined): boolean { |
There was a problem hiding this comment.
Let's subscribe in src/libs/PolicyUtils.ts to ONYXKEYS.SESSION instead of using a currentUserLogin argument and having to pass it in shouldShowPolicy references
let currentUserLogin: string | undefined;
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (value) => {
currentUserLogin = value?.email;
},
});There was a problem hiding this comment.
I initially wanna do that, but then I remembered that the user email could be changed (from the contact method page, from another client), so to keep everything reactive, I pass it as a param instead. If it's an account ID, then I will connect it to the lib file.
|
@lakchote all yours! |
|
✋ 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/lakchote in version: 9.0.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.28-3 🚀
|
Details
When we create a workspace from another device, the workspace doesn't show in the WS list. This PR fix it.
Fixed Issues
$ #46990
PROPOSAL: #46990 (comment)
Tests
Same as QA Steps
Offline tests
Requires internet connection
QA Steps
logged in with the same account in 2 devices
Go to #admins roomoptionPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4