diff --git a/src/def.d.ts b/src/def.d.ts index 1add166..fd4227f 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -220,6 +220,7 @@ interface VendettaObject { clipboard: PropIntellisense<"setString" | "getString" | "hasString">; assets: PropIntellisense<"registerAsset">; invites: PropIntellisense<"acceptInviteAndTransitionToInviteChannel">; + commands: PropIntellisense<"getBuiltInCommands">; navigation: PropIntellisense<"pushLazy">; navigationStack: PropIntellisense<"createStackNavigator">; NavigationNative: PropIntellisense<"NavigationContainer">; diff --git a/src/lib/commands.ts b/src/lib/commands.ts index b6f77bb..694fb64 100644 --- a/src/lib/commands.ts +++ b/src/lib/commands.ts @@ -1,8 +1,7 @@ import { ApplicationCommand } from "@types"; -import { findByProps } from "@metro/filters"; +import { commands as commandsModule } from "@metro/common"; import { after } from "@lib/patcher"; -const commandsModule = findByProps("getBuiltInCommands") let commands: ApplicationCommand[] = []; export function patchCommands() { diff --git a/src/lib/metro/common.ts b/src/lib/metro/common.ts index 3d26334..6ae049d 100644 --- a/src/lib/metro/common.ts +++ b/src/lib/metro/common.ts @@ -10,6 +10,7 @@ export const stylesheet = findByProps("createThemedStyleSheet"); export const clipboard = findByProps("setString", "getString", "hasString"); export const assets = findByProps("registerAsset"); export const invites = findByProps("acceptInviteAndTransitionToInviteChannel"); +export const commands = findByProps("getBuiltInCommands"); export const navigation = findByProps("pushLazy"); export const navigationStack = findByProps("createStackNavigator"); export const NavigationNative = findByProps("NavigationContainer"); diff --git a/src/ui/fixTheme.ts b/src/ui/fixTheme.ts index 20daf87..ef6391a 100644 --- a/src/ui/fixTheme.ts +++ b/src/ui/fixTheme.ts @@ -5,6 +5,7 @@ import { findByProps, findByStoreName } from "@metro/filters"; import { FluxDispatcher } from "@metro/common"; import logger from "@lib/logger"; +// TODO: Move these to common modules? const ThemeManager = findByProps("updateTheme", "overrideTheme"); const AMOLEDThemeManager = findByProps("setAMOLEDThemeEnabled"); const ThemeStore = findByStoreName("ThemeStore");