[Global] Fixes for 173.13

This commit is contained in:
redstonekasi 2023-03-31 16:46:55 +02:00 committed by Beef
parent ac4da3032e
commit a98cf94f4c
3 changed files with 7 additions and 7 deletions

View file

@ -56,4 +56,4 @@ try {
} catch (e) { } catch (e) {
console.error("Build failed...", e); console.error("Build failed...", e);
process.exit(1); process.exit(1);
} }

View file

@ -5,14 +5,13 @@ console.log("Hello from Vendetta!");
try { try {
await (await import("./src/index.ts")).default(); await (await import("./src/index.ts")).default();
} catch (ex) { } catch (ex) {
console.log(ex?.stack ?? ex.toString());
const dialog = [ const dialog = [
"Failed to load Vendetta!\n", "Failed to load Vendetta!\n",
`Build Number: ${nativeModuleProxy.InfoDictionaryManager.Build}`, `Build Number: ${(nativeModuleProxy.InfoDictionaryManager ?? nativeModuleProxy.RTNClientInfoManager).Build}`,
`Vendetta: ${__vendettaVersion}`, `Vendetta: ${__vendettaVersion}`,
ex?.stack || ex.toString(), ex?.stack || ex.toString(),
].join("\n"); ].join("\n");
alert(dialog); alert(dialog);
console.error(ex?.stack || ex.toString());
} }
})(); })();

View file

@ -48,7 +48,8 @@ export const versionHash: string = __vendettaVersion;
export function getDebugInfo() { export function getDebugInfo() {
// Discord // Discord
const InfoDictionaryManager = RN.NativeModules.InfoDictionaryManager; //! 173.13 renamed this to RTNClientInfoManager.
const InfoDictionaryManager = RN.NativeModules.InfoDictionaryManager ?? RN.NativeModules.RTNClientInfoManager;
const DCDDeviceManager = RN.NativeModules.DCDDeviceManager; const DCDDeviceManager = RN.NativeModules.DCDDeviceManager;
// Hermes // Hermes
@ -116,4 +117,4 @@ export function getDebugInfo() {
} }
)! )!
} }
} }