Skip to content

Commit c7d4a37

Browse files
committed
fix(notification): adjust notification sound playback timing
Move the sound playback to the end of Notify function, after all notification display logic has been processed. This ensures sound is played at the appropriate time in the notification flow. 将音效播放移到Notify函数末尾,在所有通知显示逻辑处理完成后。 这确保音效在通知流程的适当时机播放。 Log: 调整通知音效播放时机 PMS: BUG-354203 Influence: 调整音效播放时机到通知处理流程的最后阶段, 确保音效播放的时机更加合理。
1 parent d98c937 commit c7d4a37

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

panels/notification/server/notificationmanager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ uint NotificationManager::Notify(const QString &appName, uint replacesId, const
245245
}
246246
const bool onDesktopShow = m_setting->appValue(appId, NotificationSetting::ShowOnDesktop).toBool();
247247

248-
tryPlayNotificationSound(entity, appId, dndMode);
249-
250248
// new one
251249
if (replacesId == NoReplacesId) {
252250
entity.setBubbleId(++m_replacesCount);
@@ -292,6 +290,8 @@ uint NotificationManager::Notify(const QString &appName, uint replacesId, const
292290
}
293291
}
294292

293+
tryPlayNotificationSound(entity, appId, dndMode);
294+
295295
qInfo(notifyLog) << "Notify done, bubbleId:" << entity.bubbleId() << ", id:" << entity.id() << ", type:" << entity.processedType();
296296

297297
// If replaces_id is 0, the return value is a UINT32 that represent the notification.

0 commit comments

Comments
 (0)