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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user