1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -05:00

configurable timeouts, keyboard improvements

This commit is contained in:
bbedward
2025-08-12 14:28:53 -04:00
parent acc8272994
commit 1e23c6b12c
12 changed files with 440 additions and 276 deletions

View File

@@ -35,10 +35,9 @@ Singleton {
}
}
// Global timer to update all notification timestamps
Timer {
id: timeUpdateTimer
interval: 30000 // Update every 30 seconds
interval: 30000
repeat: true
running: root.allWrappers.length > 0
triggeredOnStart: false
@@ -50,7 +49,6 @@ Singleton {
property bool timeUpdateTick: false
property bool clockFormatChanged: false
// Android 16-style grouped notifications
readonly property var groupedNotifications: getGroupedNotifications()
readonly property var groupedPopups: getGroupedPopups()
@@ -189,7 +187,6 @@ Singleton {
readonly property string appIcon: notification.appIcon
readonly property string appName: {
if (notification.appName == "") {
// try to get the app name from the desktop entry
const entry = DesktopEntries.byId(notification.desktopEntry)
if (entry && entry.name) {
return entry.name.toLowerCase()
@@ -210,8 +207,6 @@ Singleton {
readonly property int urgency: notification.urgency
readonly property list<NotificationAction> actions: notification.actions
readonly property bool hasImage: image && image.length > 0
readonly property bool hasAppIcon: appIcon && appIcon.length > 0
readonly property Connections conn: Connections {
target: wrapper.notification.Retainable
@@ -316,7 +311,6 @@ Singleton {
visibleNotifications = [...visibleNotifications, next]
next.popup = true
// Start timeout timer if timeout > 0 (0 means never timeout)
if (next.timer.interval > 0) {
next.timer.start()
}
@@ -336,7 +330,6 @@ Singleton {
}
function releaseWrapper(w) {
// Remove from visible
let v = visibleNotifications.slice()
const vi = v.indexOf(w)
if (vi !== -1) {
@@ -344,7 +337,6 @@ Singleton {
visibleNotifications = v
}
// Remove from queue
let q = notificationQueue.slice()
const qi = q.indexOf(w)
if (qi !== -1) {
@@ -352,20 +344,16 @@ Singleton {
notificationQueue = q
}
// Destroy wrapper if non-persistent
if (w && w.destroy && !w.isPersistent) {
w.destroy()
}
}
// Android 16-style notification grouping functions
function getGroupKey(wrapper) {
// Priority 1: Use desktopEntry if available
if (wrapper.desktopEntry && wrapper.desktopEntry !== "") {
return wrapper.desktopEntry.toLowerCase()
}
// Priority 2: Use appName as fallback
return wrapper.appName.toLowerCase()
}
@@ -526,7 +514,6 @@ Singleton {
}
}
// Watch for clock format changes to update notification timestamps
Connections {
target: typeof SettingsData !== "undefined" ? SettingsData : null
function onUse24HourClockChanged() {