Make eagerPatches an internal setting
This commit is contained in:
parent
7b7b87316d
commit
bdd4b0f143
|
@ -66,11 +66,6 @@ function VencordSettings() {
|
||||||
title: "Enable React Developer Tools",
|
title: "Enable React Developer Tools",
|
||||||
note: "Requires a full restart"
|
note: "Requires a full restart"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "eagerPatches",
|
|
||||||
title: "Apply Vencord patches before they are needed",
|
|
||||||
note: "Increases startup timing, but may make app usage more fluid. Note that the difference of having this on or off is minimal."
|
|
||||||
},
|
|
||||||
!IS_WEB && (!IS_DISCORD_DESKTOP || !isWindows ? {
|
!IS_WEB && (!IS_DISCORD_DESKTOP || !isWindows ? {
|
||||||
key: "frameless",
|
key: "frameless",
|
||||||
title: "Disable the window frame",
|
title: "Disable the window frame",
|
||||||
|
|
|
@ -127,10 +127,17 @@ Object.defineProperty(Function.prototype, "O", {
|
||||||
configurable: true,
|
configurable: true,
|
||||||
|
|
||||||
set(v: OnChunksLoaded["j"]) {
|
set(v: OnChunksLoaded["j"]) {
|
||||||
// @ts-ignore
|
function setValue(target: any) {
|
||||||
delete onChunksLoaded.j;
|
Object.defineProperty(target, "j", {
|
||||||
onChunksLoaded.j = v;
|
value: v,
|
||||||
originalOnChunksLoaded.j = v;
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setValue(onChunksLoaded);
|
||||||
|
setValue(originalOnChunksLoaded);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -318,7 +325,7 @@ function patchFactory(id: PropertyKey, factory: ModuleFactory) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
originalFactory.$$vencordRequired = true;
|
originalFactory.$$vencordRequired = true;
|
||||||
for (const proxiedModules of allProxiedModules) {
|
for (const proxiedModules of allProxiedModules) {
|
||||||
proxiedModules[id] = originalFactory;
|
Reflect.set(proxiedModules, id, originalFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wreq == null && IS_DEV) {
|
if (wreq == null && IS_DEV) {
|
||||||
|
|
Loading…
Reference in a new issue