diff --git a/MTMR/Widgets/UpNextScrubberTouchBarItem.swift b/MTMR/Widgets/UpNextScrubberTouchBarItem.swift index dd19910..7adbc07 100644 --- a/MTMR/Widgets/UpNextScrubberTouchBarItem.swift +++ b/MTMR/Widgets/UpNextScrubberTouchBarItem.swift @@ -145,8 +145,10 @@ class UpNextScrubberTouchBarItem: NSCustomTouchBarItem { func getBackgroundColor(startDate: Date) -> NSColor { - let distance = abs(Date().timeIntervalSinceReferenceDate/60 - startDate.timeIntervalSinceReferenceDate/60) // Get time difference in minutes - if(distance < 30 as TimeInterval) { // Less than 30 minutes, backround is red + let distance = Date().timeIntervalSinceReferenceDate/60 - startDate.timeIntervalSinceReferenceDate/60 // Get time difference in minutes + if (distance < 0 as TimeInterval) { // If it's in the past, draw as blue + return NSColor.systemBlue + } else if (distance < 30 as TimeInterval) { // Less than 30 minutes, backround is red return NSColor.systemRed } return NSColor.clear