mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +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);
|
textEdit->insertTextMessage(textMessage);
|
||||||
|
|
||||||
// sound
|
// 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