mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-06 10:25:22 +02:00
Automatically clear stopwatch on merging a PR (#4327)
* Don't display buttons if there are no notices * clear stopwatch on merging a PR * remove redundant gt check * use ctx.Flash as per @bkcsoft comment * stop timer on closing issues/PRs too * updated translation as per review * redirect to login page after successfully activating account * remove unrelated changes * stop timer for issues that are closed via commits too..Not just the 'close' UI button
This commit is contained in:
parent
5bd594c858
commit
5390791224
6 changed files with 49 additions and 2 deletions
|
@ -1181,6 +1181,12 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
|
|||
return
|
||||
}
|
||||
} else {
|
||||
|
||||
if err := stopTimerIfAvailable(ctx.User, issue); err != nil {
|
||||
ctx.ServerError("CreateOrStopIssueStopwatch", err)
|
||||
return
|
||||
}
|
||||
|
||||
log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed)
|
||||
|
||||
notification.NotifyIssueChangeStatus(ctx.User, issue, isClosed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue