mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Fix duplicate reply for searchreply
This commit is contained in:
parent
fe66fc4762
commit
77ee8e7bc3
2 changed files with 2 additions and 8 deletions
|
@ -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)
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { messag
|
||||||
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
||||||
|
|
||||||
// dms and group chats
|
// dms and group chats
|
||||||
const dmGroup = findGroupChildrenByChildId("pin", children);
|
const dmGroup = findGroupChildrenByChildId("create-thread", children);
|
||||||
if (dmGroup && !dmGroup.some(child => child?.props?.id === "reply")) {
|
if (dmGroup && !dmGroup.some(child => child?.props?.id === "reply")) {
|
||||||
const pinIndex = dmGroup.findIndex(c => c?.props.id === "pin");
|
const pinIndex = dmGroup.findIndex(c => c?.props.id === "pin");
|
||||||
dmGroup.splice(pinIndex + 1, 0, (
|
dmGroup.splice(pinIndex + 1, 0, (
|
||||||
|
@ -50,7 +50,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { messag
|
||||||
}
|
}
|
||||||
|
|
||||||
// servers
|
// servers
|
||||||
const serverGroup = findGroupChildrenByChildId("mark-unread", children);
|
const serverGroup = findGroupChildrenByChildId("create-thread", children);
|
||||||
if (serverGroup && !serverGroup.some(child => child?.props?.id === "reply")) {
|
if (serverGroup && !serverGroup.some(child => child?.props?.id === "reply")) {
|
||||||
serverGroup.unshift((
|
serverGroup.unshift((
|
||||||
<Menu.MenuItem
|
<Menu.MenuItem
|
||||||
|
|
Loading…
Reference in a new issue