Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use the web side

Manav Rathid13f6db1dc64
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index 4d50878a19..8aa32169b1 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -152,7 +152,7 @@ const main = () => {
void mainWindow.loadURL(rendererURL);
// Continue on with the rest of the startup sequence.
- Menu.setApplicationMenu(await createApplicationMenu(mainWindow));
+ Menu.setApplicationMenu(createApplicationMenu(mainWindow));
setupTrayItem(mainWindow);
setupAutoUpdater(mainWindow);
diff --git a/desktop/src/main/menu.ts b/desktop/src/main/menu.ts
index ced7906cbc..5608cf2ec1 100644
--- a/desktop/src/main/menu.ts
+++ b/desktop/src/main/menu.ts
@@ -7,16 +7,14 @@ import {
} from "electron";
import { allowWindowClose } from "../main";
import { forceCheckForAppUpdates } from "./services/app-update";
-import autoLauncher from "./services/auto-launcher";
import { userPreferences } from "./stores/user-preferences";
/** Create and return the entries in the app's main menu bar */
-export const createApplicationMenu = async (mainWindow: BrowserWindow) => {
+export const createApplicationMenu = (mainWindow: BrowserWindow) => {
// The state of checkboxes
//
// Whenever the menu is redrawn the current value of these variables is used
// to set the checked state for the various settings checkboxes.
- let isAutoLaunchEnabled = await autoLauncher.isEnabled();
let shouldHideDockIcon = !!userPreferences.get("hideDockIcon");
const macOSOnly = (options: MenuItemConstructorOptions[]) =>
@@ -24,11 +22,6 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => {
const handleCheckForUpdates = () => forceCheckForAppUpdates(mainWindow);
- const toggleAutoLaunch = () => {
- void autoLauncher.toggleAutoLaunch();
- isAutoLaunchEnabled = !isAutoLaunchEnabled;
- };
-
const toggleHideDockIcon = () => {
// Persist
userPreferences.set("hideDockIcon", !shouldHideDockIcon);
@@ -56,25 +49,19 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => {
},
{ type: "separator" },
- {
- label: "Preferences",
- submenu: [
- {
- label: "Open Ente on Startup",
- type: "checkbox",
- checked: isAutoLaunchEnabled,
- click: toggleAutoLaunch,
- },
- ...macOSOnly([
+ ...macOSOnly([
+ {
+ label: "Preferences",
+ submenu: [
{
label: "Hide Dock Icon",
type: "checkbox",
checked: shouldHideDockIcon,
click: toggleHideDockIcon,
},
- ]),
- ],
- },
+ ],
+ },
+ ]),
{ type: "separator" },
...macOSOnly([