mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 15:35:11 +00:00
clean up my shitcode
Co-authored-by: ImBanana - Elad <eladtairo@gmail.com>
This commit is contained in:
parent
113bd7c236
commit
06bf35d640
1 changed files with 5 additions and 10 deletions
|
@ -103,18 +103,13 @@ function buildMenuItem(stickerId: string) {
|
|||
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
|
||||
const { favoriteableId, favoriteableType } = props ?? {};
|
||||
if (!favoriteableId) return;
|
||||
const menuItem = (() => {
|
||||
switch (favoriteableType) {
|
||||
case "sticker":
|
||||
const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
|
||||
if (sticker?.format_type === 3) return;
|
||||
if (favoriteableType != "sticker") return;
|
||||
|
||||
return buildMenuItem("Sticker", () => fetchSticker(favoriteableId));
|
||||
}
|
||||
})();
|
||||
const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
|
||||
if (sticker?.format_type === 3) return;
|
||||
|
||||
if (menuItem)
|
||||
findGroupChildrenByChildId("devmode-copy-id", children, true)?.push(menuItem);
|
||||
const menuItem = buildMenuItem("Sticker", () => fetchSticker(favoriteableId);
|
||||
findGroupChildrenByChildId("devmode-copy-id", children, true)?.push(menuItem);
|
||||
};
|
||||
|
||||
const expressionPickerPatch: NavContextMenuPatchCallback = (children, props: { target: HTMLElement; }) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue