-
Notifications
You must be signed in to change notification settings - Fork 3k
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 workspace list doesn't get updated unless user opens workspace chat #47958
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 |
/** | ||
* Check if the policy can be displayed | ||
* If offline, always show the policy pending deletion. | ||
* If online, show the policy pending deletion only if there is an error. | ||
* Note: Using a local ONYXKEYS.NETWORK subscription will cause a delay in | ||
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 and tests well
@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 room
optionPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.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