Return platform specific versions through ipc

Fixes host version in places like settings
This commit is contained in:
MasicoreLord 2020-10-26 01:04:37 -04:00 committed by GitHub
parent e71c5a0336
commit 81192509c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -40,7 +40,12 @@ electron.ipcMain.on(APP_GET_RELEASE_CHANNEL_SYNC, event => {
electron.ipcMain.on(APP_GET_HOST_VERSION_SYNC, event => {
// hardcode because Discord could identify Lightcord or could simply bug.
event.returnValue = "0.0.308" //electron.app.getVersion();
if(process.platform === "darwin")
event.returnValue = "0.0.259";
else if(process.platform === "linux")
event.returnValue = "0.0.12";
else
event.returnValue = "0.0.308"; //electron.app.getVersion();
});
electron.ipcMain.handle(APP_GET_MODULE_VERSIONS, (() => {
@ -135,4 +140,4 @@ electron.ipcMain.handle(APP_GET_DEFAULT_DOUBLE_CLICK_ACTION, (() => {
return function (_x13) {
return _ref8.apply(this, arguments);
};
})());
})());