From 1dad7d52ea19ef15f716a00d7845045dbbe2fc49 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:57:09 +1000 Subject: [PATCH] notifs: wrap time to days --- services/Notifs.qml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/services/Notifs.qml b/services/Notifs.qml index 3a81c5f4..4dbabf43 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -139,13 +139,18 @@ Singleton { readonly property string timeStr: { const diff = Time.date.getTime() - time.getTime(); const m = Math.floor(diff / 60000); - const h = Math.floor(m / 60); - if (h < 1 && m < 1) - return "now"; - if (h < 1) - return `${m}m`; - return `${h}h`; + if (m < 1) + return qsTr("now"); + + const h = Math.floor(m / 60); + const d = Math.floor(h / 24); + + if (d > 0) + return `${d}d`; + if (h > 0) + return `${h}h`; + return `${m}m`; } property Notification notification