preserve scroll position when toggling group collapse

This commit is contained in:
Damocles 2026-04-17 11:37:50 +02:00
parent 0d62b62da0
commit 736a8126e4

View file

@ -71,12 +71,14 @@ M.HoverPanel {
property var _collapsedGroups: ({})
function _toggleCollapse(appName) {
const savedY = notifList.contentY;
const next = Object.assign({}, _collapsedGroups);
if (next[appName])
delete next[appName];
else
next[appName] = true;
_collapsedGroups = next;
Qt.callLater(() => notifList.contentY = savedY);
}
// Group notifications by appName, sorted by max urgency desc then most recent time desc