mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-24 14:33:02 +02:00
Fix notification sounds on macOS.
This commit is contained in:
parent
1b16a84810
commit
22ec7a6d75
1 changed files with 6 additions and 3 deletions
|
@ -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)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue