Browse Source

feat(widget): Disable sound notification for `busy` status

Fix #2893.

BREAKING CHANGE: Disabling notification sound for `busy` status.
pull/3295/head
Diadlo 9 years ago
parent
commit
e7785ab4c2
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 4
      src/widget/widget.cpp

4
src/widget/widget.cpp

@ -1294,7 +1294,9 @@ bool Widget::newMessageAlert(QWidget* currentWindow, bool isActive, bool sound, @@ -1294,7 +1294,9 @@ bool Widget::newMessageAlert(QWidget* currentWindow, bool isActive, bool sound,
currentWindow->activateWindow();
}
if (Settings::getInstance().getNotifySound() && sound)
bool isBusy = Nexus::getCore()->getStatus() == Status::Busy;
if (Settings::getInstance().getNotifySound() && sound && !isBusy)
Audio::getInstance().playMono16Sound(QStringLiteral(":/audio/notification.pcm"));
}

Loading…
Cancel
Save