0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-13 07:25:14 +02:00

fix(stopwatch): publish empty-stopwatches push on stop, not only cancel

This commit is contained in:
Epid 2026-04-02 03:59:13 +03:00
parent 9cf7ea8a90
commit 0dc3607cf7

View File

@ -51,6 +51,16 @@ func IssueStopStopwatch(c *context.Context) {
} else if !ok {
c.Flash.Warning(c.Tr("repo.issues.stopwatch_already_stopped"))
}
stopwatches, err := issues_model.GetUserStopwatches(c, c.Doer.ID, db.ListOptions{})
if err != nil {
c.ServerError("GetUserStopwatches", err)
return
}
if len(stopwatches) == 0 {
websocket_service.PublishEmptyStopwatches(c.Doer.ID)
}
c.JSONRedirect("")
}