Skip to content

Commit

Permalink
migrate BasePreRenderer to PressableWithoutFeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed May 18, 2023
1 parent 654be51 commit 58db714
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, {forwardRef} from 'react';
import {ScrollView} from 'react-native-gesture-handler';
import {TouchableWithoutFeedback, View} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import htmlRendererPropTypes from '../htmlRendererPropTypes';
import withLocalize from '../../../withLocalize';
import {ShowContextMenuContext, showContextMenuForReport} from '../../../ShowContextMenuContext';
import styles from '../../../../styles/styles';
import * as ReportUtils from '../../../../libs/ReportUtils';
import PressableWithoutFeedback from '../../../Pressable/PressableWithoutFeedback';

const propTypes = {
/** Press in handler for the code block */
Expand Down Expand Up @@ -37,16 +38,18 @@ const BasePreRenderer = forwardRef((props, ref) => {
>
<ShowContextMenuContext.Consumer>
{({anchor, report, action, checkIfContextMenuActive}) => (
<TouchableWithoutFeedback
<PressableWithoutFeedback
onPressIn={props.onPressIn}
onPressOut={props.onPressOut}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
accessibilityRole="text"
accessibilityLabel="prestyled text"
>
<View>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<TDefaultRenderer {...defaultRendererProps} />
</View>
</TouchableWithoutFeedback>
</PressableWithoutFeedback>
)}
</ShowContextMenuContext.Consumer>
</ScrollView>
Expand Down

0 comments on commit 58db714

Please sign in to comment.