From: Fushan Wen Date: Fri, 16 May 2025 02:03:13 +0000 (+0800) Subject: [PATCH] libnotificationmanager: fix critical notifications not showing when Do not... X-Git-Tag: archive/raspbian/4%6.3.5-1+rpi1^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4272665f4b6f3d1bca9ccb4458d5b766d69a906b;p=plasma-workspace.git [PATCH] libnotificationmanager: fix critical notifications not showing when Do not disturb is active The filter only checks if `WasAddedDuringInhibitionRole` is true but ignores the urgency flag, which is used to show critical notifications when Do not disturb is active. (cherry picked from commit 49214ae107a4a13338876488b2bc28cf018d02c4) Co-authored-by: Fushan Wen (cherry picked from commit 8642df804d1e59db9233c44943483348328b4982) Co-authored-by: Fushan Wen Gbp-Pq: Name upstream_7635c551_libnotificationmanager-fix-critical-notifications-not-showing-when-Do-not-disturb-is-active.patch --- diff --git a/libnotificationmanager/notificationfilterproxymodel.cpp b/libnotificationmanager/notificationfilterproxymodel.cpp index 6e847a5e..f8ad1d93 100644 --- a/libnotificationmanager/notificationfilterproxymodel.cpp +++ b/libnotificationmanager/notificationfilterproxymodel.cpp @@ -191,8 +191,12 @@ bool NotificationFilterProxyModel::filterAcceptsRow(int source_row, const QModel } } - if (!m_showAddedDuringInhibition && sourceIdx.data(Notifications::WasAddedDuringInhibitionRole).toBool()) { - return false; + // Normal Do Not Disturb filtering + if (!m_showAddedDuringInhibition) { + // Show critical notifications even in Do Not Disturb + if (!m_urgencies.testFlag(urgency) && sourceIdx.data(Notifications::WasAddedDuringInhibitionRole).toBool()) { + return false; + } } return true;