Refactor ipc to be strongly typed and hide impl details (#1018)

This commit is contained in:
V 2023-05-02 02:50:51 +02:00 committed by GitHub
parent 6a1cb133cd
commit c62d05e1b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 158 additions and 218 deletions

View file

@ -155,12 +155,12 @@ export default definePlugin({
},
get electronVersion() {
return VencordNative.getVersions().electron || window.armcord?.electron || null;
return VencordNative.native.getVersions().electron || window.armcord?.electron || null;
},
get chromiumVersion() {
try {
return VencordNative.getVersions().chrome
return VencordNative.native.getVersions().chrome
// @ts-ignore Typescript will add userAgentData IMMEDIATELY
|| navigator.userAgentData?.brands?.find(b => b.brand === "Chromium" || b.brand === "Google Chrome")?.version
|| null;