mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T535, play different souns for private/supervisor message
This commit is contained in:
committed by
Mat Sutcliffe
parent
25032c6210
commit
e46e89c03e
@@ -460,9 +460,18 @@ namespace BlackGui
|
||||
textEdit->insertTextMessage(textMessage);
|
||||
|
||||
// sound
|
||||
if (!m_usedAsOverlayWidget && sGui && !sGui->isShuttingDown() && sGui->getIContextAudio() && m_audioSettings.get().textMessagePrivate())
|
||||
const bool playSound = !m_usedAsOverlayWidget && sGui && !sGui->isShuttingDown() && sGui->getIContextAudio();
|
||||
if (playSound)
|
||||
{
|
||||
sGui->getIContextAudio()->playNotification(CNotificationSounds::NotificationTextMessagePrivate, true);
|
||||
const CSettings settings = m_audioSettings.get();
|
||||
if (textMessage.isSupervisorMessage() && settings.textMessageSupervisor())
|
||||
{
|
||||
sGui->getIContextAudio()->playNotification(CNotificationSounds::NotificationTextMessageSupervisor, true);
|
||||
}
|
||||
else if (textMessage.isPrivateMessage() && settings.textMessagePrivate())
|
||||
{
|
||||
sGui->getIContextAudio()->playNotification(CNotificationSounds::NotificationTextMessagePrivate, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user