@salesforcedevs/dx-components 1.2.2-avatar-button-9 → 1.2.2-avatar-button-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -151,10 +151,6 @@ export default class AvatarButton extends LightningElement {
|
|
|
151
151
|
// eslint-disable-next-line no-undef
|
|
152
152
|
this.handleUserDataChange as EventListener
|
|
153
153
|
);
|
|
154
|
-
this.eventSource.addEventListener(
|
|
155
|
-
PlatformEventsType.UserPhotoChange,
|
|
156
|
-
this.requestUserInfo
|
|
157
|
-
);
|
|
158
154
|
this.eventSource.addEventListener(
|
|
159
155
|
PlatformEventsType.UserMerge,
|
|
160
156
|
this.handleSsoLogout
|
|
@@ -171,10 +167,6 @@ export default class AvatarButton extends LightningElement {
|
|
|
171
167
|
// eslint-disable-next-line no-undef
|
|
172
168
|
this.handleUserDataChange as EventListener
|
|
173
169
|
);
|
|
174
|
-
this.eventSource.removeEventListener(
|
|
175
|
-
PlatformEventsType.UserPhotoChange,
|
|
176
|
-
this.requestUserInfo
|
|
177
|
-
);
|
|
178
170
|
this.eventSource.removeEventListener(
|
|
179
171
|
PlatformEventsType.UserMerge,
|
|
180
172
|
this.handleSsoLogout
|
|
@@ -315,6 +307,10 @@ export default class AvatarButton extends LightningElement {
|
|
|
315
307
|
: nextUserInfo.firstName || nextUserInfo.lastName || "";
|
|
316
308
|
|
|
317
309
|
if (userInfo.custom_attributes) {
|
|
310
|
+
// ProfilePictureUrl updates earlier than photos.thumbnail, so we prefer it if it's available here.
|
|
311
|
+
nextUserInfo.avatarImgSrc =
|
|
312
|
+
userInfo.custom_attributes.ProfilePictureUrl ||
|
|
313
|
+
nextUserInfo.avatarImgSrc;
|
|
318
314
|
nextUserInfo.company = userInfo.custom_attributes.CompanyName;
|
|
319
315
|
nextUserInfo.relationship =
|
|
320
316
|
userInfo.custom_attributes.RelationshipToSalesforce;
|