[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) {
console.error("Build failed...", e);
process.exit(1);
}
}

View file

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

View file

@ -48,7 +48,8 @@ export const versionHash: string = __vendettaVersion;
export function getDebugInfo() {
// 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;
// Hermes
@ -116,4 +117,4 @@ export function getDebugInfo() {
}
)!
}
}
}