resolve isues

This commit is contained in:
sadan 2025-01-27 10:18:16 -05:00
parent eb93253b03
commit f89acf8d5d
No known key found for this signature in database

View file

@ -283,6 +283,9 @@ function CloneModal({ data }: { data: Sticker | Emoji; }) {
); );
} }
/**
* makes the return type of the arg fetchData of {@link buildMenuItem} based on the type arg
*/
type Discriminate< type Discriminate<
U extends { "t": string; }, U extends { "t": string; },
K extends U["t"] K extends U["t"]
@ -449,8 +452,8 @@ export default definePlugin({
// covers no emoji and unicode emojis // covers no emoji and unicode emojis
if (emoji?.id == null) return; if (emoji?.id == null) return;
ContextMenuApi.openContextMenuLazy(ev, async () => { ContextMenuApi.openContextMenu(ev, () => {
return () => (<Menu.Menu return <Menu.Menu
navId="onboarding-question-context" navId="onboarding-question-context"
onClose={() => FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })} onClose={() => FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })}
> >
@ -458,7 +461,7 @@ export default definePlugin({
...emoji, ...emoji,
isAnimated: emoji.animated isAnimated: emoji.animated
}))} }))}
</Menu.Menu>); </Menu.Menu>;
}); });
// fixes really annoying visual quirk due to discords code // fixes really annoying visual quirk due to discords code
setMouseDown(false); setMouseDown(false);