Skip to content

Commit

Permalink
disable single execution for avatar with image picker
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Aug 29, 2024
1 parent b9af3d1 commit 1708b72
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/pages/settings/Profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,27 @@ function ProfilePage({
titleStyles={styles.accountSettingsSectionTitle}
>
<View style={[styles.pt3, styles.pb6, styles.alignSelfStart]}>
<AvatarWithImagePicker
isUsingDefaultAvatar={UserUtils.isDefaultAvatar(currentUserPersonalDetails?.avatar ?? '')}
source={avatarURL}
avatarID={accountID}
onImageSelected={PersonalDetails.updateAvatar}
onImageRemoved={PersonalDetails.deleteAvatar}
size={CONST.AVATAR_SIZE.XLARGE}
avatarStyle={styles.avatarXLarge}
pendingAction={currentUserPersonalDetails?.pendingFields?.avatar ?? undefined}
errors={currentUserPersonalDetails?.errorFields?.avatar ?? null}
errorRowStyles={styles.mt6}
onErrorClose={PersonalDetails.clearAvatarErrors}
onViewPhotoPress={() => Navigation.navigate(ROUTES.PROFILE_AVATAR.getRoute(String(accountID)))}
previewSource={UserUtils.getFullSizeAvatar(avatarURL, accountID)}
originalFileName={currentUserPersonalDetails.originalFileName}
headerTitle={translate('profilePage.profileAvatar')}
fallbackIcon={currentUserPersonalDetails?.fallbackIcon}
editIconStyle={styles.profilePageAvatar}
/>
<MenuItemGroup shouldUseSingleExecution={false}>
<AvatarWithImagePicker
isUsingDefaultAvatar={UserUtils.isDefaultAvatar(currentUserPersonalDetails?.avatar ?? '')}
source={avatarURL}
avatarID={accountID}
onImageSelected={PersonalDetails.updateAvatar}
onImageRemoved={PersonalDetails.deleteAvatar}
size={CONST.AVATAR_SIZE.XLARGE}
avatarStyle={styles.avatarXLarge}
pendingAction={currentUserPersonalDetails?.pendingFields?.avatar ?? undefined}
errors={currentUserPersonalDetails?.errorFields?.avatar ?? null}
errorRowStyles={styles.mt6}
onErrorClose={PersonalDetails.clearAvatarErrors}
onViewPhotoPress={() => Navigation.navigate(ROUTES.PROFILE_AVATAR.getRoute(String(accountID)))}
previewSource={UserUtils.getFullSizeAvatar(avatarURL, accountID)}
originalFileName={currentUserPersonalDetails.originalFileName}
headerTitle={translate('profilePage.profileAvatar')}
fallbackIcon={currentUserPersonalDetails?.fallbackIcon}
editIconStyle={styles.profilePageAvatar}
/>
</MenuItemGroup>
</View>
{publicOptions.map((detail, index) => (
<MenuItemWithTopDescription
Expand Down

0 comments on commit 1708b72

Please sign in to comment.