[app/mpris] Fix displaying times > 2h

We need to apply the correction for all hours >= 1, not just 1
This commit is contained in:
Nicolas Fella 2021-02-04 14:35:58 +01:00
parent ea661f7d44
commit 40c155f990

View file

@ -46,7 +46,7 @@ Kirigami.Page
function msToTime(currentTime, totalTime)
{
if (totalTime.getHours() == 2) {
if (totalTime.getHours() >= 2) {
// Skip a day ahead as Date type's minimum is 1am on the 1st of January and can't go lower
currentTime.setDate(2)
currentTime.setHours(currentTime.getHours() - 1)