From 5fefcdb29ecd68ff17cc96de239aa1eb4325ae4c Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Wed, 12 Jul 2023 11:45:45 -0700 Subject: [PATCH 1/3] Safely get avatar URL for task --- src/components/ReportActionItem/TaskView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/TaskView.js b/src/components/ReportActionItem/TaskView.js index 6e6afe1591e7..28314ab6b9c1 100644 --- a/src/components/ReportActionItem/TaskView.js +++ b/src/components/ReportActionItem/TaskView.js @@ -1,6 +1,7 @@ import React, {useEffect} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; +import lodashGet from 'lodash/get'; import reportPropTypes from '../../pages/reportPropTypes'; import withLocalize, {withLocalizePropTypes} from '../withLocalize'; import withWindowDimensions from '../withWindowDimensions'; @@ -47,6 +48,7 @@ function TaskView(props) { const isCompleted = ReportUtils.isCompletedTaskReport(props.report); const isOpen = ReportUtils.isOpenTaskReport(props.report); const isCanceled = ReportUtils.isCanceledTaskReport(props.report); + const avatarURL = lodashGet(PersonalDetailsUtils.getPersonalDetailsByIDs([props.report.managerID], props.currentUserPersonalDetails.accountID), [0, 'avatar'], ''); return ( @@ -113,7 +115,7 @@ function TaskView(props) { label={props.translate('task.assignee')} title={ReportUtils.getDisplayNameForParticipant(props.report.managerID)} icon={UserUtils.getAvatar( - PersonalDetailsUtils.getPersonalDetailsByIDs([props.report.managerID], props.currentUserPersonalDetails.accountID)[0].avatar, + avatarURL, props.report.managerID, )} iconType={CONST.ICON_TYPE_AVATAR} From 7fe44ff0187fa03824c20bafcae9b043ccddd3f1 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Wed, 12 Jul 2023 12:39:56 -0700 Subject: [PATCH 2/3] Run lint on XL runner to fix memory issues --- .github/workflows/lint.yml | 2 +- src/components/ReportActionItem/TaskView.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 795271cab60a..5574594498f0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ on: jobs: lint: if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} - runs-on: ubuntu-latest + runs-on: ubuntu-latest-xl steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 diff --git a/src/components/ReportActionItem/TaskView.js b/src/components/ReportActionItem/TaskView.js index 28314ab6b9c1..fc890dd37a69 100644 --- a/src/components/ReportActionItem/TaskView.js +++ b/src/components/ReportActionItem/TaskView.js @@ -114,10 +114,7 @@ function TaskView(props) { Date: Wed, 12 Jul 2023 13:47:55 -0700 Subject: [PATCH 3/3] No need to run ESLint on XL runner after all --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5574594498f0..795271cab60a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ on: jobs: lint: if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} - runs-on: ubuntu-latest-xl + runs-on: ubuntu-latest steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8