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,17 +103,12 @@ function buildMenuItem(stickerId: string) {
|
||||||
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
|
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
|
||||||
const { favoriteableId, favoriteableType } = props ?? {};
|
const { favoriteableId, favoriteableType } = props ?? {};
|
||||||
if (!favoriteableId) return;
|
if (!favoriteableId) return;
|
||||||
const menuItem = (() => {
|
if (favoriteableType != "sticker") return;
|
||||||
switch (favoriteableType) {
|
|
||||||
case "sticker":
|
|
||||||
const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
|
const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
|
||||||
if (sticker?.format_type === 3) return;
|
if (sticker?.format_type === 3) return;
|
||||||
|
|
||||||
return buildMenuItem("Sticker", () => fetchSticker(favoriteableId));
|
const menuItem = buildMenuItem("Sticker", () => fetchSticker(favoriteableId);
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
if (menuItem)
|
|
||||||
findGroupChildrenByChildId("devmode-copy-id", children, true)?.push(menuItem);
|
findGroupChildrenByChildId("devmode-copy-id", children, true)?.push(menuItem);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue