diff --git a/src/components/dms/ActionsWrapper.tsx b/src/components/dms/ActionsWrapper.tsx index 366b117976..d96dcbdca1 100644 --- a/src/components/dms/ActionsWrapper.tsx +++ b/src/components/dms/ActionsWrapper.tsx @@ -14,7 +14,6 @@ export function ActionsWrapper({ children, }: { message: ChatBskyConvoDefs.MessageView - hasReactions?: boolean isFromSelf: boolean senderProfile?: bsky.profile.AnyProfileView moderationOpts: ModerationOpts | undefined diff --git a/src/components/dms/ActionsWrapper.web.tsx b/src/components/dms/ActionsWrapper.web.tsx index 9ea12d7f9e..75f816c07d 100644 --- a/src/components/dms/ActionsWrapper.web.tsx +++ b/src/components/dms/ActionsWrapper.web.tsx @@ -19,14 +19,12 @@ import {canReact, hasReachedReactionLimit} from './util' export function ActionsWrapper({ message, - hasReactions, isFromSelf, senderProfile, moderationOpts, children, }: { message: ChatBskyConvoDefs.MessageView - hasReactions?: boolean isFromSelf: boolean senderProfile?: bsky.profile.AnyProfileView moderationOpts: ModerationOpts | undefined @@ -113,7 +111,6 @@ export function ActionsWrapper({ isFromSelf ? [a.mr_xs, {marginLeft: 'auto'}, a.flex_row_reverse] : [a.ml_xs, {marginRight: 'auto'}], - hasReactions ? [a.mb_2xl] : undefined, ]}> {reactionsAvailable && ( diff --git a/src/components/dms/MessageItem.tsx b/src/components/dms/MessageItem.tsx index 6ac91f0c41..192e8f9e7b 100644 --- a/src/components/dms/MessageItem.tsx +++ b/src/components/dms/MessageItem.tsx @@ -8,6 +8,8 @@ import { type ViewStyle, } from 'react-native' import Animated, { + FadeIn, + FadeOut, LayoutAnimationConfig, LinearTransition, useAnimatedStyle, @@ -285,12 +287,15 @@ let MessageItem = ({ const appliedReactions = ( {hasReactions ? ( - openReactions(message) : undefined}> - {groupedReactions.map(group => ( + {groupedReactions.slice(0, 10).map(group => ( ))} - {groupedReactions.length !== reactions.length && + {(groupedReactions.length !== reactions.length || + groupedReactions.length > 10) && reactions.length > 1 ? ( ) : null} - + ) : null} ) @@ -375,30 +379,15 @@ let MessageItem = ({ style={[ messageInset, isFirstInCluster ? a.mt_md : {marginTop: CLUSTERED_MESSAGE_GAP}, + hasReactions && {paddingBottom: 26}, ]}> {showAvatar ? ( - - {avatar} - + {avatar} ) : null} @@ -418,81 +407,86 @@ let MessageItem = ({ {profile && isBlockedOrBlocking(profile) && isGroupChat ? ( ) : ( - - {AppBskyEmbedRecord.isView(message.embed) && ( - - )} - {ChatBskyEmbedJoinLink.isView(message.embed) && ( - - )} - {rt.text.length > 0 && ( - - + + {AppBskyEmbedRecord.isView(message.embed) && ( + - - )} + )} + {ChatBskyEmbedJoinLink.isView(message.embed) && ( + + )} + {rt.text.length > 0 && ( + + + + )} + {appliedReactions} - + )}