diff --git a/src/lib/native.ts b/src/lib/native.ts index 2665bdf..622033b 100644 --- a/src/lib/native.ts +++ b/src/lib/native.ts @@ -8,4 +8,5 @@ export const FileManager = (nmp.DCDFileManager ?? nmp.RTNFileManager) as _FileMa export const ClientInfoManager = nmp.InfoDictionaryManager ?? nmp.RTNClientInfoManager; //! 173.14 renamed this to RTNDeviceManager. export const DeviceManager = nmp.DCDDeviceManager ?? nmp.RTNDeviceManager; -export const BundleUpdaterManager = nmp.BundleUpdaterManager; \ No newline at end of file +export const BundleUpdaterManager = nmp.BundleUpdaterManager; +export const ThemeManager = nmp.RTNThemeManager ?? nmp.DCDTheme; \ No newline at end of file diff --git a/src/lib/themes.ts b/src/lib/themes.ts index 5f1d6d5..3bde31c 100644 --- a/src/lib/themes.ts +++ b/src/lib/themes.ts @@ -5,6 +5,7 @@ import { find, findByName, findByProps, findByStoreName } from "@metro/filters"; import { after, before, instead } from "@lib/patcher"; import { createFileBackend, createMMKVBackend, createStorage, wrapSync, awaitSyncWrapper } from "@lib/storage"; import logger from "@lib/logger"; +import { ThemeManager } from "./native"; //! As of 173.10, early-finding this does not work. // Somehow, this is late enough, though? @@ -199,7 +200,7 @@ function patchColor() { before("isThemeDark", isThemeModule, callback); before("isThemeLight", isThemeModule, callback); - before("updateTheme", window.nativeModuleProxy.RTNThemeManager, callback); + before("updateTheme", ThemeManager, callback); before("updateTheme", appearanceManager, ([theme]) => { enabled = theme === vdKey;