(
post,
index,
row,
column,
isAuxClick,
event,
)
| 647 | }; |
| 648 | |
| 649 | const onPostCardClick: PostClick = async ( |
| 650 | post, |
| 651 | index, |
| 652 | row, |
| 653 | column, |
| 654 | isAuxClick, |
| 655 | event, |
| 656 | ) => { |
| 657 | const isMiddleClick = event?.type === 'auxclick' || event?.button === 1; |
| 658 | const isModifierClick = !!(event && (event.ctrlKey || event.metaKey)); |
| 659 | const readerEligible = isReaderEligiblePost(post); |
| 660 | const skipsPostModal = post.type === PostType.LiveRoom; |
| 661 | const shouldOpenModal = |
| 662 | !skipsPostModal && |
| 663 | !isAuxClick && |
| 664 | !isMiddleClick && |
| 665 | !isModifierClick && |
| 666 | (!shouldUseListFeedLayout || readerEligible); |
| 667 | if (shouldOpenModal && shouldUseListFeedLayout && event) { |
| 668 | event.preventDefault(); |
| 669 | } |
| 670 | await onPostClick(post, index, row, column, { |
| 671 | skipPostUpdate: true, |
| 672 | }); |
| 673 | if (shouldOpenModal) { |
| 674 | onPostModalOpen({ index, row, column }); |
| 675 | } |
| 676 | }; |
| 677 | |
| 678 | const onCopyLinkClickLogged = ( |
| 679 | e: React.MouseEvent, |
nothing calls this directly
no test coverage detected