From 37c7f250bd902970dc5cd6e8b2ed751b5d9546ec Mon Sep 17 00:00:00 2001 From: re2zero Date: Tue, 10 Feb 2026 21:37:12 +0800 Subject: [PATCH] fix(notification): emit layoutChanged after collapse to refresh ListView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: When expanded app notification collapses, removeDisplaced transition blocks delegate updates for displaced items. Next app's overlap delegate appears transparent (position exists but content invisible). Solution: Emit layoutChanged() signal after collapseApp completes. This forces ListView to completely refresh all delegates, ensuring displaced items render correctly. 根本原因:展开的应用通知收起时,removeDisplaced transition阻塞被移位项目的 delegate更新。下一个应用的overlap delegate显示透明(位置存在但内容不可见)。 解决方案:collapseApp完成后发出layoutChanged()信号,强制ListView完全刷新 所有delegate,确保被移位项目正确渲染。 Log: 使用layoutChanged()强制刷新ListView修复收起后delegate不显示问题 PMS: BUG-350789 Influence: 收起超出屏幕的应用通知后,下方通知正常显示 --- panels/notification/center/notifymodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panels/notification/center/notifymodel.cpp b/panels/notification/center/notifymodel.cpp index 5ea4ea34a..e5d01b13a 100644 --- a/panels/notification/center/notifymodel.cpp +++ b/panels/notification/center/notifymodel.cpp @@ -129,6 +129,8 @@ void NotifyModel::collapseApp(int row) m_appNotifies.insert(row, overlap); endInsertRows(); } + + emit layoutChanged(); } void NotifyModel::close()