fix: correct daily work/break calculations and league back button
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:
2026-06-27 23:15:12 +03:30
parent 7dbd9fda12
commit 6f7f5878bf
4 changed files with 55 additions and 6 deletions

View File

@@ -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" {