From 9a8642b752d8edb0cd6668d6e920704cd2a1075d Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Thu, 14 Sep 2017 22:03:50 +0300 Subject: [PATCH] Change comments from current user fetches since profileImage wasn't added to attributes --- src/components/Avatar/Avatar.js | 2 -- src/containers/ProfileSettingsPage/ProfileSettingsPage.duck.js | 3 +-- src/ducks/user.duck.js | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/Avatar/Avatar.js b/src/components/Avatar/Avatar.js index aaf2f97b..2af17ce4 100644 --- a/src/components/Avatar/Avatar.js +++ b/src/components/Avatar/Avatar.js @@ -12,8 +12,6 @@ const Avatar = props => { const avatarUser = ensureUser(user); const { displayName, abbreviatedName } = avatarUser.attributes.profile; - // TODO this is a temporary avatar fix for currentUser's profile data. - // Avatar images should be included to all user's attributes in the future. if (avatarUser.profileImage && avatarUser.profileImage.id) { return (
diff --git a/src/containers/ProfileSettingsPage/ProfileSettingsPage.duck.js b/src/containers/ProfileSettingsPage/ProfileSettingsPage.duck.js index 560b3886..1440460e 100644 --- a/src/containers/ProfileSettingsPage/ProfileSettingsPage.duck.js +++ b/src/containers/ProfileSettingsPage/ProfileSettingsPage.duck.js @@ -133,8 +133,7 @@ export const updateProfile = actionPayload => { .then(response => { dispatch(updateProfileSuccess(response)); - // Temporary denormalization for profileImage - // Profile image will be included to users + // Include profile image to denormalized user entity const currentUserId = response.data.data.id; const entities = updatedEntities({}, response.data); const denormalised = denormalisedEntities(entities, 'current-user', [currentUserId]); diff --git a/src/ducks/user.duck.js b/src/ducks/user.duck.js index 9a6b10b6..90dbe822 100644 --- a/src/ducks/user.duck.js +++ b/src/ducks/user.duck.js @@ -321,8 +321,7 @@ export const fetchCurrentUser = () => return sdk.currentUser .show({ include: ['profileImage'] }) .then(response => { - // Temporary denormalization for profileImage - // Profile image will be included to users + // Include profile image to denormalized user entity const currentUserId = response.data.data.id; const entities = updatedEntities({}, response.data); const denormalised = denormalisedEntities(entities, 'current-user', [currentUserId]);