mirror of
https://github.com/LinoSchmidt/StickExporterTX.git
synced 2026-03-21 01:51:15 +01:00
Fixed taskbar finishes before render
This commit is contained in:
@@ -117,12 +117,13 @@ function startBlender() {
|
|||||||
renderInfo.endTime = new Date().getTime();
|
renderInfo.endTime = new Date().getTime();
|
||||||
if(lastFrame == frames) {
|
if(lastFrame == frames) {
|
||||||
openPage(Page.RenderFinish);
|
openPage(Page.RenderFinish);
|
||||||
|
ipcRenderer.send("renderFinished");
|
||||||
// TODO: only show notification if not in do not disturb mode, currently not working. Details: https://github.com/felixrieseberg/macos-notification-state/issues/30
|
// TODO: only show notification if not in do not disturb mode, currently not working. Details: https://github.com/felixrieseberg/macos-notification-state/issues/30
|
||||||
new Notification("Render Finished", {
|
new Notification("Render Finished", {
|
||||||
body: "Rendering finished successfully!",
|
body: "Rendering finished successfully!",
|
||||||
icon: finsishedIconPath
|
icon: finsishedIconPath
|
||||||
}).onclick = function() {
|
}).onclick = function() {
|
||||||
ipcRenderer.send("openApp");
|
ipcRenderer.send("openApp");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.errorMSG("Render Failed!");
|
logger.errorMSG("Render Failed!");
|
||||||
|
|||||||
@@ -118,7 +118,10 @@ const createWindow = () => {
|
|||||||
ipcMain.on('setProgress', (event, arg) => {
|
ipcMain.on('setProgress', (event, arg) => {
|
||||||
const progress = parseFloat(arg);
|
const progress = parseFloat(arg);
|
||||||
mainWindow.setProgressBar(progress);
|
mainWindow.setProgressBar(progress);
|
||||||
if(progress === 1 && !mainWindow.isFocused()) {
|
});
|
||||||
|
|
||||||
|
ipcMain.on('renderFinished', () => {
|
||||||
|
if(!mainWindow.isFocused()) {
|
||||||
mainWindow.setOverlayIcon(finsishedIconPath as unknown as NativeImage, 'Rendering Complete');
|
mainWindow.setOverlayIcon(finsishedIconPath as unknown as NativeImage, 'Rendering Complete');
|
||||||
mainWindow.flashFrame(true);
|
mainWindow.flashFrame(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user