Skip to content

Commit 40e57f1

Browse files
committed
feat: improve reaction list in message customization
1 parent fe20c9d commit 40e57f1

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

package/src/components/Message/MessageSimple/ReactionList/ReactionListTop.tsx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const ReactionListTop = (props: ReactionListTopProps) => {
113113
if (type === 'clustered') {
114114
return (
115115
<View style={styles.container} accessibilityLabel='Reaction List Top'>
116-
{ReactionListClustered ? <ReactionListClustered {...props} /> : null}
116+
<ReactionListClustered {...props} />
117117
</View>
118118
);
119119
}
@@ -127,25 +127,21 @@ export const ReactionListTop = (props: ReactionListTopProps) => {
127127
showsVerticalScrollIndicator={false}
128128
style={[styles.container, styles.list]}
129129
>
130-
{reactions
131-
.slice(0, 4)
132-
.map((reaction) =>
133-
ReactionListItem ? (
134-
<ReactionListItem
135-
key={reaction.type}
136-
reaction={reaction}
137-
handleReaction={handleReaction}
138-
onLongPress={onLongPress}
139-
onPress={onPress}
140-
onPressIn={onPressIn}
141-
preventPress={preventPress}
142-
showReactionsOverlay={showReactionsOverlay}
143-
supportedReactions={supportedReactions}
144-
showCount={showCount}
145-
selected={reaction.own}
146-
/>
147-
) : null,
148-
)}
130+
{reactions.slice(0, 4).map((reaction) => (
131+
<ReactionListItem
132+
key={reaction.type}
133+
reaction={reaction}
134+
handleReaction={handleReaction}
135+
onLongPress={onLongPress}
136+
onPress={onPress}
137+
onPressIn={onPressIn}
138+
preventPress={preventPress}
139+
showReactionsOverlay={showReactionsOverlay}
140+
supportedReactions={supportedReactions}
141+
showCount={showCount}
142+
selected={reaction.own}
143+
/>
144+
))}
149145
<ReactionListCountItem
150146
count={moreReactionsCount}
151147
onLongPress={onLongPress}

0 commit comments

Comments
 (0)