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:
parent
9cf7ea8a90
commit
0dc3607cf7
@ -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("")
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user