fix(whoReacted): fix avatar click (#167)

* fix white typing indicators in servers (#166)

* Drop DoNotLeak + Extras

Co-Authored-By: thororen1234 <thororen1234@users.noreply.github.com>
Co-Authored-By: thororen <78185467+thororen1234@users.noreply.github.com>
Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com>
Co-Authored-By: ynot01 <ynot000001@gmail.com>
Co-Authored-By: MrDiamondDog <84212701+MrDiamondDog@users.noreply.github.com>
Co-Authored-By: Crxaw <48805031+sitescript@users.noreply.github.com>

* Finish Purge For Merge

* fix(whoReacted): fix avatar click (#1)

* Update index.tsx

* Fixes

---------

Co-authored-by: thororen1234 <thororen1234@users.noreply.github.com>
Co-authored-by: mochie <mop48duck+cassie@gmail.com>
Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: sadan4 <117494111+sadan4@users.noreply.github.com>
Co-authored-by: ynot01 <ynot000001@gmail.com>
Co-authored-by: MrDiamondDog <84212701+MrDiamondDog@users.noreply.github.com>
Co-authored-by: Crxaw <48805031+sitescript@users.noreply.github.com>
This commit is contained in:
panbread 2025-03-03 01:18:09 +04:00 committed by GitHub
parent d832344adb
commit c46476ea10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,7 @@ const settings = definePluginSettings({
avatarClick: { avatarClick: {
description: "Toggle clicking avatars in reactions", description: "Toggle clicking avatars in reactions",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: false, default: true,
restartNeeded: true restartNeeded: true
} }
}); });
@ -175,8 +175,11 @@ export default definePlugin({
<div <div
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }} style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
> >
{settings.store.avatarClick ? ( <div
<div onClick={handleClickAvatar} onKeyPress={handleClickAvatar}> onClick={handleClickAvatar}
onKeyDown={handleClickAvatar}
style={settings.store.avatarClick ? {} : { pointerEvents: "none" }}
>
<UserSummaryItem <UserSummaryItem
users={users} users={users}
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id} guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
@ -187,19 +190,6 @@ export default definePlugin({
renderMoreUsers={makeRenderMoreUsers(users)} renderMoreUsers={makeRenderMoreUsers(users)}
/> />
</div> </div>
) : (
<div>
<UserSummaryItem
users={users}
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
renderIcon={false}
max={5}
showDefaultAvatarsForNullUsers
showUserPopout
renderMoreUsers={makeRenderMoreUsers(users)}
/>
</div>
)}
</div> </div>
); );
}, },