mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 15:02:50 -05:00
Implement 2nd tier group expansion on notifications
This commit is contained in:
@@ -16,6 +16,7 @@ Singleton {
|
||||
readonly property var groupedPopups: getGroupedPopups()
|
||||
|
||||
property var expandedGroups: ({}) // Track which groups are expanded
|
||||
property var expandedMessages: ({}) // Track which individual messages are expanded
|
||||
|
||||
NotificationServer {
|
||||
id: server
|
||||
@@ -403,6 +404,15 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleMessageExpansion(messageId) {
|
||||
let newExpandedMessages = {};
|
||||
for (const key in expandedMessages) {
|
||||
newExpandedMessages[key] = expandedMessages[key];
|
||||
}
|
||||
newExpandedMessages[messageId] = !newExpandedMessages[messageId];
|
||||
expandedMessages = newExpandedMessages;
|
||||
}
|
||||
|
||||
function getGroupTitle(group) {
|
||||
if (group.count === 1) {
|
||||
return group.latestNotification.summary;
|
||||
|
||||
Reference in New Issue
Block a user