2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Fix notifications without sounds on macOS.

This commit is contained in:
John Preston
2025-01-26 11:34:18 +04:00
parent db9e60b4b5
commit 8287d717f8
2 changed files with 6 additions and 7 deletions

View File

@@ -1277,7 +1277,9 @@ void NativeManager::doShowNotification(NotificationFields &&fields) {
// #TODO optimize
auto userpicView = item->history()->peer->createUserpicView();
const auto owner = &item->history()->owner();
const auto sound = fields.soundId ? [=, id = *fields.soundId] {
const auto withSound = fields.soundId
&& Core::App().settings().soundNotify();
const auto sound = withSound ? [=, id = *fields.soundId] {
return _localSoundCache.sound(id, [=] {
return Core::App().notifications().lookupSoundBytes(owner, id);
}, [=] {