[Global] Fix Vendetta on 193.4 (193204) (#136)

This commit is contained in:
Amsyar Rasyiq 2023-08-19 02:42:34 +08:00 committed by GitHub
parent 0790e00f00
commit a86b963330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -1,10 +1,10 @@
import { ReactNative as RN } from "@metro/common";
import { findByName, findByProps } from "@metro/filters";
import { findByDisplayName, findByName, findByProps } from "@metro/filters";
// Discord
export const Forms = findByProps("Form", "FormSection");
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 HelpMessage = findByName("HelpMessage");
// React Native's included SafeAreaView only adds padding on iOS.

View file

@ -7,5 +7,5 @@ export default function initSettings() {
patchYou(),
]
return () => patches.forEach(p => p());
return () => patches.forEach(p => p?.());
}

View file

@ -18,7 +18,7 @@ const getterFunctionName = usingNewGettersModule ? NEW_GETTER_FUNCTION : OLD_GET
const gettersModule = oldGettersModule ?? findByProps(NEW_GETTER_FUNCTION);
export default function patchYou() {
if (!gettersModule) return;
if (!gettersModule || !layoutModule) return;
const patches = new Array<Function>;
const screens = getScreens(true);