Commit 0cebca85 authored by David Jarvie's avatar David Jarvie
Browse files

Don't display a 'time to' for alarms whose trigger time has passed

parent 6ace88b9
...@@ -770,7 +770,7 @@ QString ResourceDataModelBase::timeToAlarmText(const DateTime& dateTime) ...@@ -770,7 +770,7 @@ QString ResourceDataModelBase::timeToAlarmText(const DateTime& dateTime)
return i18nc("@info n days", "%1d", days); return i18nc("@info n days", "%1d", days);
} }
int mins = (now.secsTo(dateTime.effectiveKDateTime()) + 59) / 60; int mins = (now.secsTo(dateTime.effectiveKDateTime()) + 59) / 60;
if (mins < 0) if (mins <= 0)
return QString(); return QString();
char minutes[3] = "00"; char minutes[3] = "00";
minutes[0] = (mins%60) / 10 + '0'; minutes[0] = (mins%60) / 10 + '0';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment