WhoReacted: Fix clicking user pfps also adding reaction (#977)
This commit is contained in:
parent
dfc3f05834
commit
5be86f9bd1
|
@ -85,10 +85,14 @@ function makeRenderMoreUsers(users: User[]) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleClickAvatar(event: React.MouseEvent<HTMLElement, MouseEvent>) {
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "WhoReacted",
|
name: "WhoReacted",
|
||||||
description: "Renders the Avatars of reactors",
|
description: "Renders the Avatars of reactors",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven, Devs.KannaDev],
|
||||||
|
|
||||||
patches: [{
|
patches: [{
|
||||||
find: ",reactionRef:",
|
find: ",reactionRef:",
|
||||||
|
@ -132,15 +136,17 @@ export default definePlugin({
|
||||||
<div
|
<div
|
||||||
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
|
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
|
||||||
>
|
>
|
||||||
<UserSummaryItem
|
<div onClick={handleClickAvatar}>
|
||||||
users={users}
|
<UserSummaryItem
|
||||||
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
|
users={users}
|
||||||
renderIcon={false}
|
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
|
||||||
max={5}
|
renderIcon={false}
|
||||||
showDefaultAvatarsForNullUsers
|
max={5}
|
||||||
showUserPopout
|
showDefaultAvatarsForNullUsers
|
||||||
renderMoreUsers={makeRenderMoreUsers(users)}
|
showUserPopout
|
||||||
/>
|
renderMoreUsers={makeRenderMoreUsers(users)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,5 +273,9 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
||||||
FieryFlames: {
|
FieryFlames: {
|
||||||
name: "Fiery",
|
name: "Fiery",
|
||||||
id: 890228870559698955n
|
id: 890228870559698955n
|
||||||
|
},
|
||||||
|
KannaDev: {
|
||||||
|
name: "Kanna",
|
||||||
|
id: 317728561106518019n
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue