From 281839956ed12da9c224ebf1887ece5082833928 Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 10 Jul 2023 13:17:37 +0200 Subject: [PATCH 01/13] changing branch --- src/pages/home/report/ReportActionItemSingle.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 3011dff69bf1..93daf5065ad3 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -91,6 +91,9 @@ function ReportActionItemSingle(props) { displayName = actorHint; avatarSource = UserUtils.getAvatar(delegateDetails.avatar, props.action.delegateAccountID); } + if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { + displayName = 'mimimi'; + } // Since the display name for a report action message is delivered with the report history as an array of fragments // we'll need to take the displayName from personal details and have it be in the same format for now. Eventually, From 48731082b4e1de4208c88d5cea5ecbcf5d0686fd Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 17 Jul 2023 20:00:55 +0200 Subject: [PATCH 02/13] display both names and avatars --- src/pages/home/report/ReportActionItem.js | 4 ++++ src/pages/home/report/ReportActionItemSingle.js | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 710df7e30f9c..037c510ddbc2 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -405,6 +405,7 @@ function ReportActionItem(props) { wrapperStyles={[styles.chatItem, isWhisper ? styles.pt1 : {}]} shouldShowSubscriptAvatar={props.shouldShowSubscriptAvatar} report={props.report} + iouReport = {props.iouReport} hasBeenFlagged={!_.contains([CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING], moderationDecision)} > {content} @@ -551,6 +552,9 @@ export default compose( preferredSkinTone: { key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, }, + iouReport: { + key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.iouReportID}`, + }, }), )( memo( diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 6524ba043250..8020e78c9386 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -41,6 +41,9 @@ const propTypes = { /** Report for this action */ report: reportPropTypes, + /** IOU Report for this action, if any */ + iouReport: reportPropTypes, + /** Show header for action */ showHeader: PropTypes.bool, @@ -60,6 +63,7 @@ const defaultProps = { shouldShowSubscriptAvatar: false, hasBeenFlagged: false, report: undefined, + iouReport: undefined, }; const showUserDetails = (accountID) => { @@ -91,8 +95,16 @@ function ReportActionItemSingle(props) { displayName = actorHint; avatarSource = UserUtils.getAvatar(delegateDetails.avatar, props.action.delegateAccountID); } + + // If this is a report preview, display names and avatars of both people involved + let secondaryAvatar = {}; if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { - displayName = 'mimimi'; + const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {}; + const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', ''); + displayName = displayName + ' & ' + secondaryDisplayName; + secondaryAvatar = {source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), type: CONST.ICON_TYPE_AVATAR, name: secondaryDisplayName, id: props.iouReport.ownerAccountID}; + } else if (!isWorkspaceActor) { + secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1] } const icon = {source: avatarSource, type: isWorkspaceActor ? CONST.ICON_TYPE_WORKSPACE : CONST.ICON_TYPE_AVATAR, name: displayName, id: actorAccountID}; @@ -130,7 +142,7 @@ function ReportActionItemSingle(props) { {props.shouldShowSubscriptAvatar ? ( Date: Mon, 17 Jul 2023 22:55:56 +0200 Subject: [PATCH 03/13] use helper --- .../home/report/ReportActionItemSingle.js | 70 ++++++++++++------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 8020e78c9386..50ed50739842 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -23,6 +23,7 @@ import reportPropTypes from '../../reportPropTypes'; import * as UserUtils from '../../../libs/UserUtils'; import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; import UserDetailsTooltip from '../../../components/UserDetailsTooltip'; +import MultipleAvatars from "../../../components/MultipleAvatars"; const propTypes = { /** All the data of the action */ @@ -98,13 +99,14 @@ function ReportActionItemSingle(props) { // If this is a report preview, display names and avatars of both people involved let secondaryAvatar = {}; - if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { + const displayAllActors = props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && props.iouReport; + if (displayAllActors) { const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {}; const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', ''); displayName = displayName + ' & ' + secondaryDisplayName; secondaryAvatar = {source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), type: CONST.ICON_TYPE_AVATAR, name: secondaryDisplayName, id: props.iouReport.ownerAccountID}; } else if (!isWorkspaceActor) { - secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1] + secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1]; } const icon = {source: avatarSource, type: isWorkspaceActor ? CONST.ICON_TYPE_WORKSPACE : CONST.ICON_TYPE_AVATAR, name: displayName, id: actorAccountID}; @@ -128,6 +130,45 @@ function ReportActionItemSingle(props) { } }, [isWorkspaceActor, props.report.reportID, actorAccountID, props.action.delegateAccountID]); + const getAvatar = () => { + if (displayAllActors) { + return ( + + ); + } else if (props.shouldShowSubscriptAvatar) { + return ( + + ); + } else { + return ( + + + + + + ); + } + } + return ( - {props.shouldShowSubscriptAvatar ? ( - - ) : ( - - - - - - )} + {getAvatar()} From f1b45dcdb7ef8aaa1f342f96fd6cefd65284125a Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 17 Jul 2023 23:31:56 +0200 Subject: [PATCH 04/13] lint --- src/pages/home/report/ReportActionItem.js | 4 ++ .../home/report/ReportActionItemSingle.js | 39 +++++++++---------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 037c510ddbc2..25a6fd78f35a 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -98,6 +98,9 @@ const propTypes = { /** Is this the only report action on the report? */ isOnlyReportAction: PropTypes.bool, + + /** IOU report for this action, if any */ + iouReport: reportPropTypes.isRequired, }; const defaultProps = { @@ -107,6 +110,7 @@ const defaultProps = { shouldShowSubscriptAvatar: false, hasOutstandingIOU: false, isOnlyReportAction: false, + iouReport: undefined, }; function ReportActionItem(props) { diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 50ed50739842..0696e2fb006f 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -103,7 +103,7 @@ function ReportActionItemSingle(props) { if (displayAllActors) { const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {}; const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', ''); - displayName = displayName + ' & ' + secondaryDisplayName; + displayName = `${displayName} & ${secondaryDisplayName}`; secondaryAvatar = {source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), type: CONST.ICON_TYPE_AVATAR, name: secondaryDisplayName, id: props.iouReport.ownerAccountID}; } else if (!isWorkspaceActor) { secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1]; @@ -135,8 +135,8 @@ function ReportActionItemSingle(props) { return ( ); } else if (props.shouldShowSubscriptAvatar) { @@ -149,24 +149,23 @@ function ReportActionItemSingle(props) { noMargin /> ); - } else { - return ( - - - - - - ); } + return ( + + + + + + ); } return ( From f650caf57e42117c6127ed3d338faccb9267c810 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 18 Jul 2023 12:37:40 +0200 Subject: [PATCH 05/13] style --- src/pages/home/report/ReportActionItem.js | 2 +- src/pages/home/report/ReportActionItemSingle.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 25a6fd78f35a..225e1bc5ff52 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -100,7 +100,7 @@ const propTypes = { isOnlyReportAction: PropTypes.bool, /** IOU report for this action, if any */ - iouReport: reportPropTypes.isRequired, + iouReport: reportPropTypes, }; const defaultProps = { diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 0696e2fb006f..43e8358b376a 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -139,7 +139,8 @@ function ReportActionItemSingle(props) { shouldShowTooltip /> ); - } else if (props.shouldShowSubscriptAvatar) { + } + if (props.shouldShowSubscriptAvatar) { return ( Date: Tue, 18 Jul 2023 13:50:45 +0200 Subject: [PATCH 06/13] prettier --- src/pages/home/report/ReportActionItem.js | 2 +- .../home/report/ReportActionItemSingle.js | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 225e1bc5ff52..e584359ba554 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -409,7 +409,7 @@ function ReportActionItem(props) { wrapperStyles={[styles.chatItem, isWhisper ? styles.pt1 : {}]} shouldShowSubscriptAvatar={props.shouldShowSubscriptAvatar} report={props.report} - iouReport = {props.iouReport} + iouReport={props.iouReport} hasBeenFlagged={!_.contains([CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING], moderationDecision)} > {content} diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 43e8358b376a..677d07a055dc 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -23,7 +23,7 @@ import reportPropTypes from '../../reportPropTypes'; import * as UserUtils from '../../../libs/UserUtils'; import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; import UserDetailsTooltip from '../../../components/UserDetailsTooltip'; -import MultipleAvatars from "../../../components/MultipleAvatars"; +import MultipleAvatars from '../../../components/MultipleAvatars'; const propTypes = { /** All the data of the action */ @@ -104,7 +104,12 @@ function ReportActionItemSingle(props) { const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {}; const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', ''); displayName = `${displayName} & ${secondaryDisplayName}`; - secondaryAvatar = {source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), type: CONST.ICON_TYPE_AVATAR, name: secondaryDisplayName, id: props.iouReport.ownerAccountID}; + secondaryAvatar = { + source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), + type: CONST.ICON_TYPE_AVATAR, + name: secondaryDisplayName, + id: props.iouReport.ownerAccountID, + }; } else if (!isWorkspaceActor) { secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1]; } @@ -134,9 +139,9 @@ function ReportActionItemSingle(props) { if (displayAllActors) { return ( ); } @@ -167,7 +172,7 @@ function ReportActionItemSingle(props) { ); - } + }; return ( @@ -179,9 +184,7 @@ function ReportActionItemSingle(props) { accessibilityLabel={actorHint} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} > - - {getAvatar()} - + {getAvatar()} {props.showHeader ? ( From 6437e01a76aeec3fd26d76dafc31d9a66f594e14 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 21 Jul 2023 10:26:56 +0200 Subject: [PATCH 07/13] fix typo --- src/pages/home/report/ReportActionItem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index c21b332e43e1..f2e5577b0ebe 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -574,6 +574,7 @@ export default compose( }, iouReport: { key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.iouReportID}`, + }, emojiReactions: { key: ({action}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${action.reportActionID}`, }, From c0cf92c4277d07f5b3858104709edee85e381a3c Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 25 Jul 2023 13:51:56 +0200 Subject: [PATCH 08/13] margin fix --- src/components/MultipleAvatars.js | 3 ++- src/styles/styles.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/MultipleAvatars.js b/src/components/MultipleAvatars.js index 3b20d99fa2ea..41d084c25d21 100644 --- a/src/components/MultipleAvatars.js +++ b/src/components/MultipleAvatars.js @@ -73,7 +73,8 @@ const defaultProps = { function MultipleAvatars(props) { const [avatarRows, setAvatarRows] = useState([props.icons]); - let avatarContainerStyles = props.size === CONST.AVATAR_SIZE.SMALL ? [styles.emptyAvatarSmall, styles.emptyAvatarMarginSmall] : [styles.emptyAvatar, styles.emptyAvatarMargin]; + const avatarMargin = props.isInReportAction ? styles.emptyAvatarMarginChat : styles.emptyAvatarMargin; + let avatarContainerStyles = props.size === CONST.AVATAR_SIZE.SMALL ? [styles.emptyAvatarSmall, styles.emptyAvatarMarginSmall] : [styles.emptyAvatar, avatarMargin]; const singleAvatarStyle = props.size === CONST.AVATAR_SIZE.SMALL ? styles.singleAvatarSmall : styles.singleAvatar; const secondAvatarStyles = [props.size === CONST.AVATAR_SIZE.SMALL ? styles.secondAvatarSmall : styles.secondAvatar, ...props.secondAvatarStyle]; const tooltipTexts = props.shouldShowTooltip ? _.pluck(props.icons, 'name') : ['']; diff --git a/src/styles/styles.js b/src/styles/styles.js index eeb39d38b381..d072fa8f63ae 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1963,6 +1963,10 @@ const styles = { marginRight: variables.avatarChatSpacing, }, + emptyAvatarMarginChat: { + marginRight: variables.avatarChatSpacing - 12, + }, + emptyAvatarMarginSmall: { marginRight: variables.avatarChatSpacing - 4, }, From 63f68ad860dce3570b81ce84d5dd47d5df474848 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 25 Jul 2023 15:13:19 +0200 Subject: [PATCH 09/13] fix border --- src/pages/home/report/ReportActionItem.js | 1 + src/pages/home/report/ReportActionItemSingle.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 1319cacded5a..6898393710c4 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -418,6 +418,7 @@ function ReportActionItem(props) { shouldShowSubscriptAvatar={props.shouldShowSubscriptAvatar} report={props.report} iouReport={props.iouReport} + isHovered={hovered} hasBeenFlagged={!_.contains([CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING], moderationDecision)} > {content} diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 677d07a055dc..b5307a7388d8 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -24,6 +24,8 @@ import * as UserUtils from '../../../libs/UserUtils'; import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; import UserDetailsTooltip from '../../../components/UserDetailsTooltip'; import MultipleAvatars from '../../../components/MultipleAvatars'; +import * as StyleUtils from '../../../styles/StyleUtils'; +import themeColors from '../../../styles/themes/default'; const propTypes = { /** All the data of the action */ @@ -54,6 +56,9 @@ const propTypes = { /** If the message has been flagged for moderation */ hasBeenFlagged: PropTypes.bool, + /** If the action is being hovered */ + isHovered: PropTypes.bool, + ...withLocalizePropTypes, }; @@ -65,6 +70,7 @@ const defaultProps = { hasBeenFlagged: false, report: undefined, iouReport: undefined, + isHovered: false, }; const showUserDetails = (accountID) => { @@ -142,6 +148,10 @@ function ReportActionItemSingle(props) { icons={[icon, secondaryAvatar]} isInReportAction shouldShowTooltip + secondAvatarStyle={[ + StyleUtils.getBackgroundAndBorderStyle(themeColors.appBG), + props.isHovered ? StyleUtils.getBackgroundAndBorderStyle(themeColors.highlightBG) : undefined, + ]} /> ); } From a145a7bb0c3c5c15445a0c9f251e231ef30b2580 Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 26 Jul 2023 12:02:16 +0200 Subject: [PATCH 10/13] correct tooltip in workspace icon --- src/pages/home/report/ReportActionItemSingle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index b5307a7388d8..cb81a272e37b 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -106,10 +106,11 @@ function ReportActionItemSingle(props) { // If this is a report preview, display names and avatars of both people involved let secondaryAvatar = {}; const displayAllActors = props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && props.iouReport; + const primaryDisplayName = displayName; if (displayAllActors) { const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {}; const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', ''); - displayName = `${displayName} & ${secondaryDisplayName}`; + displayName = `${primaryDisplayName} & ${secondaryDisplayName}`; secondaryAvatar = { source: UserUtils.getAvatar(secondaryUserDetails.avatar, props.iouReport.ownerAccountID), type: CONST.ICON_TYPE_AVATAR, @@ -119,7 +120,7 @@ function ReportActionItemSingle(props) { } else if (!isWorkspaceActor) { secondaryAvatar = ReportUtils.getIcons(props.report, {})[props.report.isOwnPolicyExpenseChat ? 0 : 1]; } - const icon = {source: avatarSource, type: isWorkspaceActor ? CONST.ICON_TYPE_WORKSPACE : CONST.ICON_TYPE_AVATAR, name: displayName, id: actorAccountID}; + const icon = {source: avatarSource, type: isWorkspaceActor ? CONST.ICON_TYPE_WORKSPACE : CONST.ICON_TYPE_AVATAR, name: primaryDisplayName, id: actorAccountID}; // Since the display name for a report action message is delivered with the report history as an array of fragments // we'll need to take the displayName from personal details and have it be in the same format for now. Eventually, From b38111d3cdec71205e1fc7f9132aab2b420b537e Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 7 Aug 2023 10:52:22 +0200 Subject: [PATCH 11/13] lint --- src/pages/home/report/ReportActionItem.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 9ab5081836b1..e78bd74a8b5d 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -103,14 +103,12 @@ const propTypes = { emojiReactions: EmojiReactionsPropTypes, personalDetailsList: PropTypes.objectOf(personalDetailsPropType), - /** Is this the only report action on the report? */ - isOnlyReportAction: PropTypes.bool, - /** IOU report for this action, if any */ iouReport: reportPropTypes, /** Flag to show, hide the thread divider line */ shouldHideThreadDividerLine: PropTypes.bool, + }; const defaultProps = { @@ -120,7 +118,6 @@ const defaultProps = { personalDetailsList: {}, shouldShowSubscriptAvatar: false, hasOutstandingIOU: false, - isOnlyReportAction: false, iouReport: undefined, shouldHideThreadDividerLine: false, }; From 0a70b141e0df99e5df8b261ac12226fbbd9414f5 Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 7 Aug 2023 11:01:43 +0200 Subject: [PATCH 12/13] prettier --- src/pages/home/report/ReportActionItem.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index e78bd74a8b5d..17658a0dad51 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -108,7 +108,6 @@ const propTypes = { /** Flag to show, hide the thread divider line */ shouldHideThreadDividerLine: PropTypes.bool, - }; const defaultProps = { From e1b1c211749b7a46568e87d7ca65ee9781e3b4cf Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 8 Aug 2023 15:48:04 +0200 Subject: [PATCH 13/13] use action --- src/pages/home/report/ReportActionItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 17658a0dad51..f38f52af1fe5 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -600,7 +600,7 @@ export default compose( key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, }, iouReport: { - key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.iouReportID}`, + key: ({action}) => `${ONYXKEYS.COLLECTION.REPORT}${ReportActionsUtils.getIOUReportIDFromReportActionPreview(action)}`, }, emojiReactions: { key: ({action}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${action.reportActionID}`,