add missing case in entry and fix unit formatting; ref #13
This commit is contained in:
parent
ba824325bc
commit
dcd613622e
2 changed files with 6 additions and 6 deletions
|
@ -107,13 +107,13 @@ func (entry *Entry) GetOutputForTrack(isRunning bool, wasRunning bool) (string)
|
||||||
|
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
trackDiffNow := now.Sub(entry.Begin)
|
trackDiffNow := now.Sub(entry.Begin)
|
||||||
trackDiffNowOut := time.Time{}.Add(trackDiffNow)
|
durationString := fmtDuration(trackDiffNow)
|
||||||
|
|
||||||
if isRunning == true && wasRunning == false {
|
if isRunning == true && wasRunning == false {
|
||||||
outputPrefix = "began tracking"
|
outputPrefix = "began tracking"
|
||||||
} else if isRunning == true && wasRunning == true {
|
} else if isRunning == true && wasRunning == true {
|
||||||
outputPrefix = "tracking"
|
outputPrefix = "tracking"
|
||||||
outputSuffix = fmt.Sprintf(" for %sh", color.FgLightWhite.Render(trackDiffNowOut.Format("15:04")))
|
outputSuffix = fmt.Sprintf(" for %sh", color.FgLightWhite.Render(durationString))
|
||||||
} else if isRunning == false && wasRunning == false {
|
} else if isRunning == false && wasRunning == false {
|
||||||
outputPrefix = "tracked"
|
outputPrefix = "tracked"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue