mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
fix: small code quality and mismatch.
This commit is contained in:
@@ -15,7 +15,7 @@ const { logger } = require("../server/logger");
|
||||
/**
|
||||
* Configures autoUpdater behavior:
|
||||
* - disables automatic download
|
||||
* - disables automatic install on quit
|
||||
* - disables automatic installation on quit
|
||||
* (manual user-controlled update flow)
|
||||
*/
|
||||
autoUpdater.autoDownload = false;
|
||||
@@ -51,7 +51,7 @@ function initAutoUpdater(mainWindow) {
|
||||
});
|
||||
|
||||
if (response === 0) {
|
||||
autoUpdater.downloadUpdate();
|
||||
await autoUpdater.downloadUpdate();
|
||||
} else {
|
||||
mainWindow?.webContents.executeJavaScript(
|
||||
`window.showUpdateBadge && window.showUpdateBadge("${info.version}")`
|
||||
@@ -108,6 +108,9 @@ function initAutoUpdater(mainWindow) {
|
||||
* Separated from init for reusability and testability.
|
||||
*/
|
||||
async function checkForUpdates() {
|
||||
|
||||
if (!require("electron").app.isPackaged) return ;
|
||||
|
||||
try {
|
||||
await autoUpdater.checkForUpdates();
|
||||
} catch (err) {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
const { ipcMain, dialog, shell } = require("electron");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { logger, logDir } = require("../server/logger");
|
||||
const { configFeatures, featuresPath } = require("../config");
|
||||
const { getThemes, reloadThemes } = require("./themeManager");
|
||||
|
||||
@@ -270,7 +270,6 @@ async function loadThemesFromFolder() {
|
||||
if (fs.statSync(filePath).isDirectory()) {
|
||||
const theme = await loadThemeFromFolder(filePath, themeId);
|
||||
if (theme) themes.push(theme);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user