From 6f95203dfa5beb3b48a9cc6061e712acd0ca8fb3 Mon Sep 17 00:00:00 2001 From: Palm Date: Wed, 6 Nov 2024 14:32:36 +0700 Subject: [PATCH] fix(lib/api/native/modules): add more native module fallbacks (#102) closes #99 --- src/lib/api/native/modules/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/api/native/modules/index.ts b/src/lib/api/native/modules/index.ts index 615bed6..c0736ed 100644 --- a/src/lib/api/native/modules/index.ts +++ b/src/lib/api/native/modules/index.ts @@ -3,9 +3,8 @@ import { RNModules } from "./types"; const nmp = window.nativeModuleProxy; export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager; -export const FileManager = (nmp.DCDFileManager ?? nmp.RTNFileManager) as RNModules.FileManager; -export const ClientInfoManager = nmp.InfoDictionaryManager ?? nmp.RTNClientInfoManager; -export const DeviceManager = nmp.DCDDeviceManager ?? nmp.RTNDeviceManager; +export const FileManager = (nmp.NativeFileModule ?? nmp.RTNFileManager ?? nmp.DCDFileManager) as RNModules.FileManager; +export const ClientInfoManager = nmp.NativeClientInfoModule ?? nmp.RTNClientInfoManager ?? nmp.InfoDictionaryManager; +export const DeviceManager = nmp.NativeDeviceModule ?? nmp.RTNDeviceManager ?? nmp.DCDDeviceManager; export const { BundleUpdaterManager } = nmp; -export const ThemeManager = nmp.RTNThemeManager ?? nmp.DCDTheme; - +export const ThemeManager = nmp.NativeThemeModule ?? nmp.RTNThemeManager ?? nmp.DCDTheme;