fix: correct daily work/break calculations and league back button
All checks were successful
CI / build (push) Successful in 38s
All checks were successful
CI / build (push) Successful in 38s
- ComputeDailyTotals: only assume working from dayStart when first event is 'out' (cross-midnight session); otherwise start idle. Fixes inflated work/break counts in reports, status, export, burnout, salary, and RPG. - leagueToggleCallback: add settings back keyboard when RPG is disabled. - webhook: add graceful HTTP server shutdown on context cancellation.
This commit is contained in:
@@ -18,7 +18,7 @@ func ComputeDailyTotals(events []Event, minBreakThreshold int64, dayStart, dayEn
|
||||
state := StateIdle
|
||||
var workStart, breakStart int64
|
||||
|
||||
if dayStart > 0 {
|
||||
if dayStart > 0 && sorted[0].EventType == "out" {
|
||||
state = StateWorking
|
||||
workStart = dayStart
|
||||
} else if sorted[0].EventType == "out" {
|
||||
|
||||
Reference in New Issue
Block a user