Separate window urgency hint setting for mentions

This commit is contained in:
miruka
2020-06-02 21:42:16 -04:00
parent ccd2308427
commit 76f0c5626f
5 changed files with 19 additions and 4 deletions

View File

@@ -10,8 +10,11 @@ QtObject {
}
function onAlertRequested() {
const msec = window.settings.alertOnMessageForMsec
function onAlertRequested(highImportance) {
const msec =
highImportance ?
window.settings.alertOnMentionForMsec :
window.settings.alertOnMessageForMsec
if (Qt.application.state !== Qt.ApplicationActive && msec !== 0) {
window.alert(msec === -1 ? 0 : msec) // -1 → 0 = no time out