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:
commit
73c526d147
@ -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;
|
||||
|
@ -407,6 +407,7 @@ const Home = () => {
|
||||
gpuId: gpuId.length === 0 ? null : gpuId,
|
||||
saveImageAs,
|
||||
scale,
|
||||
overwrite,
|
||||
});
|
||||
logit("🏁 UPSCAYL");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user