mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix notification sounds on macOS.
This commit is contained in:
@@ -697,6 +697,7 @@ void System::showNext() {
|
||||
break;
|
||||
}
|
||||
const auto notifyItem = notify->item;
|
||||
const auto notifySilent = computeSkipState(*notify).silent;
|
||||
const auto messageType = (notify->type
|
||||
== Data::ItemNotificationType::Message);
|
||||
const auto isForwarded = messageType
|
||||
@@ -773,7 +774,7 @@ void System::showNext() {
|
||||
if (!_lastHistoryItemId && groupedItem) {
|
||||
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
||||
_lastHistoryItemId = groupedItem->fullId();
|
||||
_lastSoundId = MaybeSoundFor(
|
||||
_lastSoundId = notifySilent ? std::nullopt : MaybeSoundFor(
|
||||
notifyThread,
|
||||
groupedItem->specialNotificationPeer());
|
||||
}
|
||||
@@ -794,7 +795,7 @@ void System::showNext() {
|
||||
_lastForwardedCount += forwardedCount;
|
||||
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
||||
_lastHistoryItemId = groupedItem->fullId();
|
||||
_lastSoundId = MaybeSoundFor(
|
||||
_lastSoundId = notifySilent ? std::nullopt : MaybeSoundFor(
|
||||
notifyThread,
|
||||
groupedItem->specialNotificationPeer());
|
||||
_waitForAllGroupedTimer.callOnce(kWaitingForAllGroupedDelay);
|
||||
@@ -817,7 +818,9 @@ void System::showNext() {
|
||||
.forwardedCount = forwardedCount,
|
||||
.reactionFrom = notify->reactionSender,
|
||||
.reactionId = reaction,
|
||||
.soundId = MaybeSoundFor(notifyThread, soundFrom),
|
||||
.soundId = (notifySilent
|
||||
? std::nullopt
|
||||
: MaybeSoundFor(notifyThread, soundFrom)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user