Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2025-04-15 17:25:13 +01:00
parent 0ad1f6c829
commit 73a6d9972c
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
2 changed files with 8 additions and 1 deletions

View File

@ -371,6 +371,8 @@ if (store.get("disableHardwareAcceleration") === true) {
}
app.on("ready", async () => {
console.debug("Reached Electron ready state");
let asarPath: string;
try {
@ -460,6 +462,7 @@ app.on("ready", async () => {
console.log("No update_base_url is defined: auto update is disabled");
}
console.debug("Ensuring storage is ready");
await store.safeStorageReady();
// Load the previous window state with fallback to defaults
@ -468,6 +471,7 @@ app.on("ready", async () => {
defaultHeight: 768,
});
console.debug("Opening main window");
const preloadScript = path.normalize(`${__dirname}/preload.cjs`);
global.mainWindow = new BrowserWindow({
// https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

View File

@ -92,7 +92,10 @@ class Store extends ElectronStore<{
if (this.has("safeStorage")) return;
console.info("Store migration: started");
if (!safeStorage.isEncryptionAvailable()) {
console.error("Store migration: safeStorage is not available");
console.error(
"Store migration: safeStorage is not available with backend",
safeStorage.getSelectedStorageBackend(),
);
throw new Error("safeStorage is not available");
}