Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class ReportActionItem extends Component {
>
{!this.props.displayAsGroup
? (
<ReportActionItemSingle action={this.props.action}>
<ReportActionItemSingle action={this.props.action} showHeader={!this.props.draftMessage}>
{children}
</ReportActionItemSingle>
)
Expand Down
36 changes: 21 additions & 15 deletions src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ const propTypes = {
/** Children view component for this action item */
children: PropTypes.node.isRequired,

/** Show header for action */
showHeader: PropTypes.bool,

...withLocalizePropTypes,
};

const defaultProps = {
personalDetails: {},
wrapperStyles: [styles.chatItem],
showHeader: true,
};

const showUserDetails = (email) => {
Expand Down Expand Up @@ -65,21 +69,23 @@ const ReportActionItemSingle = (props) => {
/>
</Pressable>
<View style={[styles.chatItemRight]}>
<View style={[styles.chatItemMessageHeader]}>
<Pressable style={[styles.flexShrink1]} onPress={() => showUserDetails(props.action.actorEmail)}>
{_.map(personArray, (fragment, index) => (
<ReportActionItemFragment
key={`person-${props.action.sequenceNumber}-${index}`}
fragment={fragment}
tooltipText={props.action.actorEmail}
isAttachment={props.action.isAttachment}
isLoading={props.action.loading}
isSingleLine
/>
))}
</Pressable>
<ReportActionItemDate timestamp={props.action.timestamp} />
</View>
{props.showHeader ? (
<View style={[styles.chatItemMessageHeader]}>
<Pressable style={[styles.flexShrink1]} onPress={() => showUserDetails(props.action.actorEmail)}>
{_.map(personArray, (fragment, index) => (
<ReportActionItemFragment
key={`person-${props.action.sequenceNumber}-${index}`}
fragment={fragment}
tooltipText={props.action.actorEmail}
isAttachment={props.action.isAttachment}
isLoading={props.action.loading}
isSingleLine
/>
))}
</Pressable>
<ReportActionItemDate timestamp={props.action.timestamp} />
</View>
) : null}
{props.children}
</View>
</View>
Expand Down