build: automatically glob all patch files
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
import "./themedSplash";
|
||||
import "./ipcCommands";
|
||||
import "./appBadge";
|
||||
import "./patches";
|
||||
import "./fixes";
|
||||
import "./arrpc";
|
||||
import "__patches__"; // auto generated by the build script
|
||||
|
||||
export * as Components from "./components";
|
||||
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
// TODO: Possibly auto generate glob if we have more patches in the future
|
||||
import "./enableNotificationsByDefault";
|
||||
import "./platformClass";
|
||||
import "./allowDevToolsKeybind";
|
||||
import "./hideSwitchDevice";
|
||||
import "./hideVenmicInput";
|
||||
import "./screenShareFixes";
|
||||
import "./spellCheck";
|
||||
import "./windowsTitleBar";
|
||||
import "./streamerMode";
|
||||
import "./windowMethods";
|
||||
import "./hideDownloadAppsButton";
|
||||
import "./fixAutoGainToggle";
|
||||
Reference in New Issue
Block a user