tl;dr :
Expected behavior:
flashFrame(true) to continuously flash until flashFrame(false) being called.
Actual behavior:
flashFrame(true) only flash for 4 times.
My question:
Is there any configuration I need to configure in BrowserWindow() or it is expected?
Context:
I'm currently working on a ReactJS messaging desktop application where I wish the taskbar icon to flash when the application receive a new message and when the window is minimized. I did perform some searches on the internet and on the Electron documentation before I ask this question over here. I do manage to find someone to have similar question asked over here but the answer isn't what I wanted to achieve.
What I've observed, the flashFrame(true) is indeed working but it only flash for precisely 4 times before it went back to default mode. My code is as below:
if (electron) { //if it is run on Electron
if (remote.getCurrentWindow().isMinimized() === true) { //if the current window are minimized
remote.getCurrentWindow().flashFrame(true);
}
}
Is there any configuration I need to make for the flashFrame(true) to flash continuously or is it Electron expected behavior?
Environment:
"devDependencies": {
"electron": "latest",
"electron-builder": "latest",
}