mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-09 21:44:15 +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;
|
break;
|
||||||
}
|
}
|
||||||
const auto notifyItem = notify->item;
|
const auto notifyItem = notify->item;
|
||||||
|
const auto notifySilent = computeSkipState(*notify).silent;
|
||||||
const auto messageType = (notify->type
|
const auto messageType = (notify->type
|
||||||
== Data::ItemNotificationType::Message);
|
== Data::ItemNotificationType::Message);
|
||||||
const auto isForwarded = messageType
|
const auto isForwarded = messageType
|
||||||
|
@ -773,7 +774,7 @@ void System::showNext() {
|
||||||
if (!_lastHistoryItemId && groupedItem) {
|
if (!_lastHistoryItemId && groupedItem) {
|
||||||
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
||||||
_lastHistoryItemId = groupedItem->fullId();
|
_lastHistoryItemId = groupedItem->fullId();
|
||||||
_lastSoundId = MaybeSoundFor(
|
_lastSoundId = notifySilent ? std::nullopt : MaybeSoundFor(
|
||||||
notifyThread,
|
notifyThread,
|
||||||
groupedItem->specialNotificationPeer());
|
groupedItem->specialNotificationPeer());
|
||||||
}
|
}
|
||||||
|
@ -794,7 +795,7 @@ void System::showNext() {
|
||||||
_lastForwardedCount += forwardedCount;
|
_lastForwardedCount += forwardedCount;
|
||||||
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
_lastHistorySessionId = groupedItem->history()->session().uniqueId();
|
||||||
_lastHistoryItemId = groupedItem->fullId();
|
_lastHistoryItemId = groupedItem->fullId();
|
||||||
_lastSoundId = MaybeSoundFor(
|
_lastSoundId = notifySilent ? std::nullopt : MaybeSoundFor(
|
||||||
notifyThread,
|
notifyThread,
|
||||||
groupedItem->specialNotificationPeer());
|
groupedItem->specialNotificationPeer());
|
||||||
_waitForAllGroupedTimer.callOnce(kWaitingForAllGroupedDelay);
|
_waitForAllGroupedTimer.callOnce(kWaitingForAllGroupedDelay);
|
||||||
|
@ -817,7 +818,9 @@ void System::showNext() {
|
||||||
.forwardedCount = forwardedCount,
|
.forwardedCount = forwardedCount,
|
||||||
.reactionFrom = notify->reactionSender,
|
.reactionFrom = notify->reactionSender,
|
||||||
.reactionId = reaction,
|
.reactionId = reaction,
|
||||||
.soundId = MaybeSoundFor(notifyThread, soundFrom),
|
.soundId = (notifySilent
|
||||||
|
? std::nullopt
|
||||||
|
: MaybeSoundFor(notifyThread, soundFrom)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue