aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHazel Summer <mail@kannadev.com>2023-04-24 00:42:38 +0100
committerGitHub <noreply@github.com>2023-04-24 01:42:38 +0200
commit5be86f9bd160edea9a525e5a3b249ba573284d33 (patch)
tree65deda481de352a9e362f8227fc26cb3c008e519 /src
parentdfc3f05834db65fc73fa939957a39498c0428a9c (diff)
downloadVencord-5be86f9bd160edea9a525e5a3b249ba573284d33.tar.gz
Vencord-5be86f9bd160edea9a525e5a3b249ba573284d33.tar.bz2
Vencord-5be86f9bd160edea9a525e5a3b249ba573284d33.zip
WhoReacted: Fix clicking user pfps also adding reaction (#977)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/whoReacted.tsx26
-rw-r--r--src/utils/constants.ts4
2 files changed, 20 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>
);
}
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 26430ff..d9d1067 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -273,5 +273,9 @@ export const Devs = /* #__PURE__*/ Object.freeze({
FieryFlames: {
name: "Fiery",
id: 890228870559698955n
+ },
+ KannaDev: {
+ name: "Kanna",
+ id: 317728561106518019n
}
});