Skip to content

Commit

Permalink
fix: long press of a video attachment does not push up the video message
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Nov 22, 2024
1 parent 4e7d931 commit b48a247
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/VideoPlayerPreview/VideoPlayerThumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function VideoPlayerThumbnail({thumbnailUrl, onPress, accessibilityLabel, isDele
)}
{!isDeleted ? (
<ShowContextMenuContext.Consumer>
{({anchor, report, reportNameValuePairs, action, checkIfContextMenuActive, isDisabled}) => (
{({anchor, report, reportNameValuePairs, action, checkIfContextMenuActive, isDisabled, onShowContextMenu}) => (
<PressableWithoutFeedback
style={[styles.videoThumbnailContainer]}
accessibilityLabel={accessibilityLabel}
Expand All @@ -57,7 +57,16 @@ function VideoPlayerThumbnail({thumbnailUrl, onPress, accessibilityLabel, isDele
if (isDisabled) {
return;
}
showContextMenuForReport(event, anchor, report?.reportID ?? '-1', action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report, reportNameValuePairs));
onShowContextMenu(() => {
showContextMenuForReport(
event,
anchor,
report?.reportID ?? '-1',
action,
checkIfContextMenuActive,
ReportUtils.isArchivedRoom(report, reportNameValuePairs),
);
});
}}
shouldUseHapticsOnLongPress
>
Expand Down

0 comments on commit b48a247

Please sign in to comment.