ServerListAPI: Fix Patch
This commit is contained in:
parent
884db4973d
commit
f0f628eceb
2 changed files with 4 additions and 3 deletions
|
|
@ -39,8 +39,8 @@ export default definePlugin({
|
|||
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
|
||||
},
|
||||
{
|
||||
match: /lastTargetNode.{0,50}\{\}\)\]/,
|
||||
replace: "$&.concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Below))"
|
||||
match: /lastTargetNode.{0,25}\?null:\i,/,
|
||||
replace: "$&...Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Below),"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import "./style.css";
|
|||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { getIntlMessage } from "@utils/discord";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy, findStoreLazy } from "@webpack";
|
||||
import { FluxDispatcher } from "@webpack/common";
|
||||
|
|
@ -348,7 +349,7 @@ export default definePlugin({
|
|||
}
|
||||
|
||||
try {
|
||||
return child?.props?.renderTreeNode !== null;
|
||||
return child?.props?.["aria-label"] === getIntlMessage("SERVERS");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue