mirror of
https://github.com/LinoSchmidt/StickExporterTX.git
synced 2026-03-21 10:00:47 +01:00
Fixed taskbar finishes before render
This commit is contained in:
@@ -117,12 +117,13 @@ function startBlender() {
|
||||
renderInfo.endTime = new Date().getTime();
|
||||
if(lastFrame == frames) {
|
||||
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
|
||||
new Notification("Render Finished", {
|
||||
body: "Rendering finished successfully!",
|
||||
icon: finsishedIconPath
|
||||
}).onclick = function() {
|
||||
ipcRenderer.send("openApp");
|
||||
new Notification("Render Finished", {
|
||||
body: "Rendering finished successfully!",
|
||||
icon: finsishedIconPath
|
||||
}).onclick = function() {
|
||||
ipcRenderer.send("openApp");
|
||||
}
|
||||
} else {
|
||||
logger.errorMSG("Render Failed!");
|
||||
|
||||
@@ -118,7 +118,10 @@ const createWindow = () => {
|
||||
ipcMain.on('setProgress', (event, arg) => {
|
||||
const progress = parseFloat(arg);
|
||||
mainWindow.setProgressBar(progress);
|
||||
if(progress === 1 && !mainWindow.isFocused()) {
|
||||
});
|
||||
|
||||
ipcMain.on('renderFinished', () => {
|
||||
if(!mainWindow.isFocused()) {
|
||||
mainWindow.setOverlayIcon(finsishedIconPath as unknown as NativeImage, 'Rendering Complete');
|
||||
mainWindow.flashFrame(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user