ServerListAPI: Fix Patch

This commit is contained in:
thororen1234 2026-01-06 09:38:13 -05:00
parent 884db4973d
commit f0f628eceb
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -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),"
}
]
}

View file

@ -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;