build: automatically glob all patch files

This commit is contained in:
Vendicated
2025-05-16 20:43:27 +02:00
parent d9a7e81f71
commit 1a673f2318
6 changed files with 40 additions and 23 deletions
+2 -2
View File
@@ -13,12 +13,12 @@ addPatch({
replacement: {
// eslint-disable-next-line no-useless-escape
match: /(\i)\.\i\.getState\(\).neverShowModal/,
replace: "$& || $self.shouldIgnore($1)"
replace: "$& || $self.shouldIgnoreDevice($1)"
}
}
],
shouldIgnore(state: any) {
shouldIgnoreDevice(state: any) {
return Object.keys(state?.default?.lastDeviceConnected ?? {})?.[0] === "vencord-screen-share";
}
});