From 1fe7f3c297aa3af594c500e5068eea4c2d4cc19b Mon Sep 17 00:00:00 2001 From: V Date: Thu, 11 May 2023 19:26:55 +0200 Subject: [PATCH] ViewIcons: More consistent context menu position --- src/plugins/viewIcons.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx index 3463895e..0543a640 100644 --- a/src/plugins/viewIcons.tsx +++ b/src/plugins/viewIcons.tsx @@ -84,7 +84,7 @@ function openImage(url: string) { const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: UserContextProps) => () => { const memberAvatar = GuildMemberStore.getMember(guildId!, user.id)?.avatar || null; - children.splice(1, 0, ( + children.splice(-1, 0, ( () => { if (!banner && !icon) return; - // before copy id (if it exists) - const idx = children.length + - children[children.length - 1]?.props?.children?.props?.id === "devmode-copy-id" - ? -2 - : -1; - - children.splice(idx, 0, ( + children.splice(-1, 0, ( {icon ? (