Repository navigation
Fix WS name and avatar are not updated dynamically in the chat - #49403
neil-marcellini merged 4 commits into
Conversation
| // disabling to protect against empty strings | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| const policyAvatarURL = report?.policyAvatar || allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatarURL; | ||
| const policyAvatarURL = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatarURL || report?.policyAvatar; |
There was a problem hiding this comment.
However, the Pusher only updates the policy.avatarURL, but doesn't send the updated policyAvatar. But if we look at the LHN, the avatar is updated, that's because we use caching for the avatar. The announce room of the workspace doesn't have policyAvatar, so it will use the updated policy.avatarURL and save it to the cache. When the LHN tries to get the avatar, the cache is available, so it shows the updated avatar.
As explained in my proposal, the LHN ws avatar is updated because the announce room of the workspace doesn't have policyAvatar, so it fallbacks to the policy.avatarURL, but I just recheck and now the announce room has the policyAvatar. So, I updated the fallback here
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari49403-web-safari-001.mp4MacOS: Desktop49403-desktop-001.mp4iOS: mWeb Safari49403-mweb-safari-001.mp4Android: Native49403-android-native-001.mp4Android: mWeb Chrome49403-mweb-chrome-001.mp4iOS: Native49403-ios-native-001.mp4 |
rojiphil
left a comment
There was a problem hiding this comment.
Thanks @bernhardoj.
LGTM and works well too.
@neil-marcellini Over to you for review. Thanks
neil-marcellini
left a comment
There was a problem hiding this comment.
Other than the ESLint checks to fix, it looks great. Thanks.
|
@bernhardoj please fix the conflicts and ESLint checks, then I think we can merge |
|
Conflict fixed. |
neil-marcellini
left a comment
There was a problem hiding this comment.
More conflicts, then we can merge. Please DM me when fixed.
|
@neil-marcellini Fixed. DM'd you in Slack. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.0.41-1 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.41-10 🚀
|
Details
In the WS chat, the WS avatar and name are not updated dynamically.
Fixed Issues
$ #48710
PROPOSAL: #48710 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Device 1 & 2 logged in as the same user
PR 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