1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-21 04:59:34 +01:00

Merge pull request #430 from upscayl/suvojit/overwrite-fix

FIX - Overwrite setting not persisting
This commit is contained in:
NayamAmarshe 2023-08-30 10:31:22 +05:30 committed by GitHub
commit 73c526d147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -165,15 +165,6 @@ app.on("ready", async () => {
quality = parseInt(lastSavedQuality);
}
});
// GET OVERWRITE SETTINGS FROM LOCAL STORAGE
mainWindow.webContents
.executeJavaScript('localStorage.getItem("overwrite");', true)
.then((lastSavedOverwrite: boolean | null) => {
if (lastSavedOverwrite !== null) {
overwrite = lastSavedOverwrite;
}
});
mainWindow.webContents.send(commands.OS, getPlatform());
});
@ -380,6 +371,7 @@ ipcMain.handle(commands.SELECT_CUSTOM_MODEL_FOLDER, async (event, message) => {
//------------------------Image Upscayl-----------------------------//
ipcMain.on(commands.UPSCAYL, async (event, payload) => {
if (!mainWindow) return;
overwrite = payload.overwrite;
const model = payload.model as string;
const gpuId = payload.gpuId as string;
const saveImageAs = payload.saveImageAs as string;

View File

@ -407,6 +407,7 @@ const Home = () => {
gpuId: gpuId.length === 0 ? null : gpuId,
saveImageAs,
scale,
overwrite,
});
logit("🏁 UPSCAYL");
}