[Global] Fix Vendetta on 193.4 (193204) (#136)
This commit is contained in:
parent
0790e00f00
commit
a86b963330
3 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
import { ReactNative as RN } from "@metro/common";
|
import { ReactNative as RN } from "@metro/common";
|
||||||
import { findByName, findByProps } from "@metro/filters";
|
import { findByDisplayName, findByName, findByProps } from "@metro/filters";
|
||||||
|
|
||||||
// Discord
|
// Discord
|
||||||
export const Forms = findByProps("Form", "FormSection");
|
export const Forms = findByProps("Form", "FormSection");
|
||||||
export const General = findByProps("Button", "Text", "View");
|
export const General = findByProps("Button", "Text", "View");
|
||||||
export const Alert = findByProps("alertDarkStyles", "alertLightStyles").default;
|
export const Alert = findByDisplayName("FluxContainer(Alert)");
|
||||||
export const Button = findByProps("Looks", "Colors", "Sizes") as React.ComponentType<any> & { Looks: any, Colors: any, Sizes: any };
|
export const Button = findByProps("Looks", "Colors", "Sizes") as React.ComponentType<any> & { Looks: any, Colors: any, Sizes: any };
|
||||||
export const HelpMessage = findByName("HelpMessage");
|
export const HelpMessage = findByName("HelpMessage");
|
||||||
// React Native's included SafeAreaView only adds padding on iOS.
|
// React Native's included SafeAreaView only adds padding on iOS.
|
||||||
|
|
|
@ -7,5 +7,5 @@ export default function initSettings() {
|
||||||
patchYou(),
|
patchYou(),
|
||||||
]
|
]
|
||||||
|
|
||||||
return () => patches.forEach(p => p());
|
return () => patches.forEach(p => p?.());
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ const getterFunctionName = usingNewGettersModule ? NEW_GETTER_FUNCTION : OLD_GET
|
||||||
const gettersModule = oldGettersModule ?? findByProps(NEW_GETTER_FUNCTION);
|
const gettersModule = oldGettersModule ?? findByProps(NEW_GETTER_FUNCTION);
|
||||||
|
|
||||||
export default function patchYou() {
|
export default function patchYou() {
|
||||||
if (!gettersModule) return;
|
if (!gettersModule || !layoutModule) return;
|
||||||
|
|
||||||
const patches = new Array<Function>;
|
const patches = new Array<Function>;
|
||||||
const screens = getScreens(true);
|
const screens = getScreens(true);
|
||||||
|
|
Loading…
Reference in a new issue