alertOnMessageForMsec: correctly handle 0 value
If 0: don't show any alert If -1: show alert indefinitly until user focuses the window
This commit is contained in:
parent
684ddd364c
commit
379a851a62
|
@ -11,8 +11,10 @@ QtObject {
|
|||
|
||||
|
||||
function onAlertRequested() {
|
||||
if (Qt.application.state !== Qt.ApplicationActive) {
|
||||
window.alert(window.settings.alertOnMessageForMsec)
|
||||
const msec = window.settings.alertOnMessageForMsec
|
||||
|
||||
if (Qt.application.state !== Qt.ApplicationActive && msec !== 0) {
|
||||
window.alert(msec === -1 ? 0 : msec) // -1 → 0 = no time out
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user