Fix duplicate reply for searchreply

This commit is contained in:
thororen1234 2024-09-18 12:01:40 -04:00
parent fe66fc4762
commit 77ee8e7bc3
2 changed files with 2 additions and 8 deletions

View file

@ -1,6 +0,0 @@
# SearchReply
Adds a reply button to search results.
![the plugin in action](https://github.com/Vendicated/Vencord/assets/45497981/07e741d3-0f97-4e5c-82b0-80712ecf2cbb)

View file

@ -35,7 +35,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { messag
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
// dms and group chats
const dmGroup = findGroupChildrenByChildId("pin", children);
const dmGroup = findGroupChildrenByChildId("create-thread", children);
if (dmGroup && !dmGroup.some(child => child?.props?.id === "reply")) {
const pinIndex = dmGroup.findIndex(c => c?.props.id === "pin");
dmGroup.splice(pinIndex + 1, 0, (
@ -50,7 +50,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { messag
}
// servers
const serverGroup = findGroupChildrenByChildId("mark-unread", children);
const serverGroup = findGroupChildrenByChildId("create-thread", children);
if (serverGroup && !serverGroup.some(child => child?.props?.id === "reply")) {
serverGroup.unshift((
<Menu.MenuItem