1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-25 08:46:25 +00:00

remove setStatusFunc wrapper

This commit is contained in:
programminglaboratorys 2024-09-30 06:57:38 +03:00
parent bb64c9b1fa
commit bba595bb7c

View file

@ -32,8 +32,7 @@ const EmojiComponent = findComponentByCodeLazy(/\i.translateSurrogatesToInlineEm
const StatusStyles = findByPropsLazy("statusItem");
const customStatusSettings = getUserSettingLazy("status", "customStatus");
const setStatusFunc = findByCodeLazy(/default\.track\(\i.\i.CUSTOM_STATUS_UPDATED/);
const setStatus = (status: DiscordStatus) => setStatusFunc(status.text, status.emojiInfo, status.clearAfter, { "location": { "section": "Account Panel", "object": "Avatar" } });
const setStatus = findByCodeLazy(/default\.track\(\i.\i.CUSTOM_STATUS_UPDATED/);
interface Emoji {
animated: boolean;
@ -93,7 +92,7 @@ const StatusSubMenuComponent = () => {
{Object.values((settings.store.StatusPresets as { [k: string]: DiscordStatus; })).map(status => <Menu.MenuItem
id={"status-presets-" + status.text}
label={status.status}
action={() => setStatus(status)}
action={() => setStatus(status.text, status.emojiInfo, status.clearAfter, { "location": { "section": "Account Panel", "object": "Avatar" } })}
render={() => <RenderStatusMenuItem status={status} />}
/>)}
</Menu.Menu>;