(
post,
index,
row,
column,
isAuxClick,
event,
)
| 580 | }; |
| 581 | |
| 582 | const onPostCardClick: PostClick = async ( |
| 583 | post, |
| 584 | index, |
| 585 | row, |
| 586 | column, |
| 587 | isAuxClick, |
| 588 | event, |
| 589 | ) => { |
| 590 | const isMiddleClick = event?.type === 'auxclick' || event?.button === 1; |
| 591 | const isModifierClick = !!(event && (event.ctrlKey || event.metaKey)); |
| 592 | const readerEligible = isReaderEligiblePost(post); |
| 593 | const skipsPostModal = post.type === PostType.LiveRoom; |
| 594 | const shouldOpenModal = |
| 595 | !skipsPostModal && |
| 596 | !isAuxClick && |
| 597 | !isMiddleClick && |
| 598 | !isModifierClick && |
| 599 | (!shouldUseListFeedLayout || readerEligible); |
| 600 | if (shouldOpenModal && shouldUseListFeedLayout && event) { |
| 601 | event.preventDefault(); |
| 602 | } |
| 603 | await onPostClick(post, index, row, column, { |
| 604 | skipPostUpdate: true, |
| 605 | }); |
| 606 | if (shouldOpenModal) { |
| 607 | onPostModalOpen({ index, row, column }); |
| 608 | } |
| 609 | }; |
| 610 | |
| 611 | const onCopyLinkClickLogged = ( |
| 612 | e: React.MouseEvent, |
nothing calls this directly
no test coverage detected