Add updater channels.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { IpcMainEvent } from "electron";
|
||||
import log from "electron-log/main";
|
||||
import { autoUpdater } from "electron-updater";
|
||||
import { User } from "firebase/auth";
|
||||
import client from "../graphql/graphql-client";
|
||||
import {
|
||||
@@ -8,7 +10,6 @@ import {
|
||||
QUERY_MASTERDATA_TYPED,
|
||||
} from "../graphql/queries";
|
||||
import Store from "../store/store";
|
||||
import log from "electron-log/main";
|
||||
|
||||
const ipcMainHandleAuthStateChanged = async (
|
||||
event: IpcMainEvent,
|
||||
@@ -33,6 +34,15 @@ const ipcMainHandleAuthStateChanged = async (
|
||||
Store.set("app.masterdata.opcodes", JSON.parse(OpCodes.masterdata[0]?.value));
|
||||
log.debug("Received authentication state change from Renderer.", user);
|
||||
log.debug("Requery shop information & master data.");
|
||||
|
||||
//Check for updates
|
||||
const convCo = activeBodyshop.bodyshops[0].convenient_company;
|
||||
if (convCo === "alpha") {
|
||||
autoUpdater.channel = "alpha";
|
||||
} else if (convCo === "beta") {
|
||||
autoUpdater.channel = "beta";
|
||||
}
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
};
|
||||
|
||||
export { ipcMainHandleAuthStateChanged };
|
||||
|
||||
Reference in New Issue
Block a user