Skip to content

Commit

Permalink
Merge pull request #20343 from Skalakid/17031-migrate-ReportActionIte…
Browse files Browse the repository at this point in the history
…mSingle

17031 - migrate ReportActionItemSingle to PressableWithoutFeedback
  • Loading branch information
marcaaron authored Jun 16, 2023
2 parents 394a34e + c69abd5 commit 88edb47
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import lodashGet from 'lodash/get';
import React from 'react';
import {View, Pressable} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import reportActionPropTypes from './reportActionPropTypes';
Expand All @@ -21,6 +21,7 @@ import CONST from '../../../CONST';
import SubscriptAvatar from '../../../components/SubscriptAvatar';
import reportPropTypes from '../../reportPropTypes';
import * as UserUtils from '../../../libs/UserUtils';
import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback';
import UserDetailsTooltip from '../../../components/UserDetailsTooltip';

const propTypes = {
Expand Down Expand Up @@ -85,11 +86,13 @@ function ReportActionItemSingle(props) {

return (
<View style={props.wrapperStyles}>
<Pressable
<PressableWithoutFeedback
style={[styles.alignSelfStart, styles.mr3]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(actorAccountID)}
accessibilityLabel={actorEmail}
accessibilityRole="button"
>
<OfflineWithFeedback pendingAction={lodashGet(pendingFields, 'avatar', null)}>
{props.shouldShowSubscriptAvatar ? (
Expand All @@ -111,15 +114,17 @@ function ReportActionItemSingle(props) {
</UserDetailsTooltip>
)}
</OfflineWithFeedback>
</Pressable>
</PressableWithoutFeedback>
<View style={[styles.chatItemRight]}>
{props.showHeader ? (
<View style={[styles.chatItemMessageHeader]}>
<Pressable
<PressableWithoutFeedback
style={[styles.flexShrink1, styles.mr1]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(actorAccountID)}
accessibilityLabel={actorEmail}
accessibilityRole="button"
>
{_.map(personArray, (fragment, index) => (
<ReportActionItemFragment
Expand All @@ -131,7 +136,7 @@ function ReportActionItemSingle(props) {
isSingleLine
/>
))}
</Pressable>
</PressableWithoutFeedback>
<ReportActionItemDate created={props.action.created} />
</View>
) : null}
Expand Down

0 comments on commit 88edb47

Please sign in to comment.