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

@@ -144,7 +144,8 @@ func (h *Handler) leagueToggleCallback(ctx context.Context, chatID int64, msgID
return
}
if !st.RPGEnabled {
h.editText(ctx, chatID, msgID, "League requires the RPG system. Enable RPG first in Settings.", nil)
kb := settingsBackKeyboard()
h.editText(ctx, chatID, msgID, "League requires the RPG system. Enable RPG first in Settings.", &kb)
return
}
text, kb := h.buildToggleKeyboard(user.ID, "league", "WorkTime League")