Extend notification popup lifetime

This commit is contained in:
David Heinemeier Hansson committed 2026-05-27 10:50:31 +02:00
1 parent ee97329aee
commit 88816ab9be
3 files changed
+38 -7

No files matched your search

@@ -56,6 +56,8 @@ function glyphFromHints(hints) {
function snapshotOf(notification, timestamp) {
var n = notification || {}
var id = n.id || 0
var expireTimeout = Number(n.expireTimeout || 0)
if (!isFinite(expireTimeout) || expireTimeout < 0) expireTimeout = 0
return {
id: id,
originalId: id,
@@ -66,6 +68,7 @@ function snapshotOf(notification, timestamp) {
image: n.image || "",
glyph: glyphFromHints(n.hints),
urgency: n.urgency,
expireTimeout: expireTimeout,
timestamp: timestamp === undefined ? Date.now() : timestamp,
ref: notification
}
@@ -83,6 +86,7 @@ function historyEntry(value, normalUrgency) {
image: e.image || "",
glyph: e.glyph || "",
urgency: typeof e.urgency === "number" ? e.urgency : normalUrgency,
expireTimeout: 0,
timestamp: e.timestamp || 0,
ref: null
}