diff options
author | Hazel Summer <mail@kannadev.com> | 2023-04-24 00:42:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 01:42:38 +0200 |
commit | 5be86f9bd160edea9a525e5a3b249ba573284d33 (patch) | |
tree | 65deda481de352a9e362f8227fc26cb3c008e519 /src/plugins/whoReacted.tsx | |
parent | dfc3f05834db65fc73fa939957a39498c0428a9c (diff) | |
download | Vencord-5be86f9bd160edea9a525e5a3b249ba573284d33.tar.gz Vencord-5be86f9bd160edea9a525e5a3b249ba573284d33.tar.bz2 Vencord-5be86f9bd160edea9a525e5a3b249ba573284d33.zip |
WhoReacted: Fix clicking user pfps also adding reaction (#977)
Diffstat (limited to 'src/plugins/whoReacted.tsx')
-rw-r--r-- | src/plugins/whoReacted.tsx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/plugins/whoReacted.tsx b/src/plugins/whoReacted.tsx index 4b1c828..6ceb301 100644 --- a/src/plugins/whoReacted.tsx +++ b/src/plugins/whoReacted.tsx @@ -85,10 +85,14 @@ function makeRenderMoreUsers(users: User[]) { }; } +function handleClickAvatar(event: React.MouseEvent<HTMLElement, MouseEvent>) { + event.stopPropagation(); +} + export default definePlugin({ name: "WhoReacted", description: "Renders the Avatars of reactors", - authors: [Devs.Ven], + authors: [Devs.Ven, Devs.KannaDev], patches: [{ find: ",reactionRef:", @@ -132,15 +136,17 @@ export default definePlugin({ <div style={{ marginLeft: "0.5em", transform: "scale(0.9)" }} > - <UserSummaryItem - users={users} - guildId={ChannelStore.getChannel(message.channel_id)?.guild_id} - renderIcon={false} - max={5} - showDefaultAvatarsForNullUsers - showUserPopout - renderMoreUsers={makeRenderMoreUsers(users)} - /> + <div onClick={handleClickAvatar}> + <UserSummaryItem + users={users} + guildId={ChannelStore.getChannel(message.channel_id)?.guild_id} + renderIcon={false} + max={5} + showDefaultAvatarsForNullUsers + showUserPopout + renderMoreUsers={makeRenderMoreUsers(users)} + /> + </div> </div> ); } |