aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/viewIcons.tsx
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-11 19:26:55 +0200
committerV <vendicated@riseup.net>2023-05-11 19:26:55 +0200
commit1fe7f3c297aa3af594c500e5068eea4c2d4cc19b (patch)
treea01239760a4894e428de8b178a4836bcf2718a8a /src/plugins/viewIcons.tsx
parent622e8dc3e06e99d3cba83766e2e4d92c3189ec7f (diff)
downloadVencord-1fe7f3c297aa3af594c500e5068eea4c2d4cc19b.tar.gz
Vencord-1fe7f3c297aa3af594c500e5068eea4c2d4cc19b.tar.bz2
Vencord-1fe7f3c297aa3af594c500e5068eea4c2d4cc19b.zip
ViewIcons: More consistent context menu position
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r--src/plugins/viewIcons.tsx10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx
index 3463895..0543a64 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, (
<Menu.MenuGroup>
<Menu.MenuItem
id="view-avatar"
@@ -109,13 +109,7 @@ const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: U
const GuildContext: NavContextMenuPatchCallback = (children, { guild: { id, icon, banner } }: GuildContextProps) => () => {
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, (
<Menu.MenuGroup>
{icon ? (
<Menu.MenuItem