Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import {Pressable} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
import {propTypes as anchorForAttachmentsOnlyPropTypes, defaultProps as anchorForAttachmentsOnlyDefaultProps} from './anchorForAttachmentsOnlyPropTypes';
Expand All @@ -11,6 +10,7 @@ import fileDownload from '../../libs/fileDownload';
import addEncryptedAuthTokenToURL from '../../libs/addEncryptedAuthTokenToURL';
import {ShowContextMenuContext, showContextMenuForReport} from '../ShowContextMenuContext';
import * as ReportUtils from '../../libs/ReportUtils';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** Press in handler for the link */
Expand Down Expand Up @@ -45,7 +45,7 @@ const BaseAnchorForAttachmentsOnly = (props) => {
return (
<ShowContextMenuContext.Consumer>
{({anchor, report, action, checkIfContextMenuActive}) => (
<Pressable
<PressableWithoutFeedback
style={props.style}
onPress={() => {
if (isDownloading) {
Expand All @@ -57,14 +57,16 @@ const BaseAnchorForAttachmentsOnly = (props) => {
onPressIn={props.onPressIn}
onPressOut={props.onPressOut}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
accessibilityLabel={fileName}
accessibilityRole="button"
>
<AttachmentView
source={sourceURLWithAuth}
file={{name: fileName}}
shouldShowDownloadIcon
shouldShowLoadingSpinnerIcon={isDownloading}
/>
</Pressable>
</PressableWithoutFeedback>
)}
</ShowContextMenuContext.Consumer>
);
Expand Down