Remove legacy code for handling Riot->Element autoLauncher migration (#2501)
This commit is contained in:
@@ -259,25 +259,6 @@ async function setupGlobals(): Promise<void> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for an auto-launcher under 'Riot' and if we find one,
|
|
||||||
// port its enabled/disabled-ness over to the new 'Element' launcher
|
|
||||||
async function moveAutoLauncher(): Promise<void> {
|
|
||||||
if (!global.vectorConfig.brand || global.vectorConfig.brand === "Element") {
|
|
||||||
const oldLauncher = new AutoLaunch({
|
|
||||||
name: "Riot",
|
|
||||||
isHidden: true,
|
|
||||||
mac: {
|
|
||||||
useLaunchAgent: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const wasEnabled = await oldLauncher.isEnabled();
|
|
||||||
if (wasEnabled) {
|
|
||||||
await oldLauncher.disable();
|
|
||||||
await global.launcher.enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
global.appQuitting = false;
|
global.appQuitting = false;
|
||||||
|
|
||||||
const exitShortcuts: Array<(input: Input, platform: string) => boolean> = [
|
const exitShortcuts: Array<(input: Input, platform: string) => boolean> = [
|
||||||
@@ -364,7 +345,6 @@ app.on("ready", async () => {
|
|||||||
try {
|
try {
|
||||||
asarPath = await getAsarPath();
|
asarPath = await getAsarPath();
|
||||||
await setupGlobals();
|
await setupGlobals();
|
||||||
await moveAutoLauncher();
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("App setup failed: exiting", e);
|
console.log("App setup failed: exiting", e);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user