Skip to content

Commit fede509

Browse files
authored
Merge pull request #1122 from GetStream/vishal/reaction-touchable-handlers
2 parents 93cad0d + f2f25fa commit fede509

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

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

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -198,34 +198,7 @@ const ReactionListWithContext = <
198198
: x2 - (reactionSize * reactions.length) / 2 - strokeSize;
199199

200200
return (
201-
<TouchableOpacity
202-
disabled={preventPress}
203-
onLongPress={(event) => {
204-
if (onLongPress) {
205-
onLongPress({
206-
emitter: 'reactionList',
207-
event,
208-
});
209-
}
210-
}}
211-
onPress={(event) => {
212-
if (onPress) {
213-
onPress({
214-
defaultHandler: () => showMessageOverlay(true),
215-
emitter: 'reactionList',
216-
event,
217-
});
218-
}
219-
}}
220-
onPressIn={(event) => {
221-
if (onPressIn) {
222-
onPressIn({
223-
defaultHandler: () => showMessageOverlay(true),
224-
emitter: 'reactionList',
225-
event,
226-
});
227-
}
228-
}}
201+
<View
229202
style={[
230203
styles.container,
231204
{
@@ -266,7 +239,34 @@ const ReactionListWithContext = <
266239
<Circle cx={x2} cy={y2} fill={alignmentLeft ? fill : white} r={radius * 2} />
267240
</Svg>
268241
</View>
269-
<View
242+
<TouchableOpacity
243+
disabled={preventPress}
244+
onLongPress={(event) => {
245+
if (onLongPress) {
246+
onLongPress({
247+
emitter: 'reactionList',
248+
event,
249+
});
250+
}
251+
}}
252+
onPress={(event) => {
253+
if (onPress) {
254+
onPress({
255+
defaultHandler: () => showMessageOverlay(true),
256+
emitter: 'reactionList',
257+
event,
258+
});
259+
}
260+
}}
261+
onPressIn={(event) => {
262+
if (onPressIn) {
263+
onPressIn({
264+
defaultHandler: () => showMessageOverlay(true),
265+
emitter: 'reactionList',
266+
event,
267+
});
268+
}
269+
}}
270270
style={[
271271
styles.reactionBubble,
272272
{
@@ -290,10 +290,10 @@ const ReactionListWithContext = <
290290
type={reaction.type}
291291
/>
292292
))}
293-
</View>
293+
</TouchableOpacity>
294294
</View>
295295
) : null}
296-
</TouchableOpacity>
296+
</View>
297297
);
298298
};
299299

0 commit comments

Comments
 (0)