(
post,
index,
row,
column,
isAuxClick,
event,
)
| 595 | }; |
| 596 | |
| 597 | const onPostCardClick: PostClick = async ( |
| 598 | post, |
| 599 | index, |
| 600 | row, |
| 601 | column, |
| 602 | isAuxClick, |
| 603 | event, |
| 604 | ) => { |
| 605 | const isMiddleClick = event?.type === 'auxclick' || event?.button === 1; |
| 606 | const isModifierClick = !!(event && (event.ctrlKey || event.metaKey)); |
| 607 | const readerEligible = isReaderEligiblePost(post); |
| 608 | const skipsPostModal = post.type === PostType.LiveRoom; |
| 609 | const shouldOpenModal = |
| 610 | !skipsPostModal && |
| 611 | !isAuxClick && |
| 612 | !isMiddleClick && |
| 613 | !isModifierClick && |
| 614 | (!shouldUseListFeedLayout || readerEligible); |
| 615 | if (shouldOpenModal && shouldUseListFeedLayout && event) { |
| 616 | event.preventDefault(); |
| 617 | } |
| 618 | await onPostClick(post, index, row, column, { |
| 619 | skipPostUpdate: true, |
| 620 | }); |
| 621 | if (shouldOpenModal) { |
| 622 | onPostModalOpen({ index, row, column }); |
| 623 | } |
| 624 | }; |
| 625 | |
| 626 | const onCopyLinkClickLogged = ( |
| 627 | e: React.MouseEvent, |
nothing calls this directly
no test coverage detected