From b66e03b02b9984e85e9cca9b12d3f42f892410eb Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+erikreider@users.noreply.github.com> Date: Wed, 28 Jul 2021 13:46:30 +0200 Subject: [PATCH] Fixed notification now text not appearing --- src/notification/notification.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/notification/notification.vala b/src/notification/notification.vala index 460ebbe..3cee6d7 100644 --- a/src/notification/notification.vala +++ b/src/notification/notification.vala @@ -54,13 +54,15 @@ namespace SwayNotificatonCenter { } private string get_readable_time () { - string value = "Now"; + string value = ""; double diff = (GLib.get_real_time () * 0.000001) - param.time; double secs = diff / 60; double hours = secs / 60; double days = hours / 24; - if (secs >= 1 && hours < 1) { + if (secs < 1) { + value = "Now"; + } else if (secs >= 1 && hours < 1) { // 1m - 1h var val = Math.floor (secs); value = val.to_string () + " min";