mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Improve performance of dashboard (#4977)
This commit is contained in:
committed by
techknowlogick
parent
49ea6e0deb
commit
b3b7598ec6
@@ -49,6 +49,10 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := issue.loadRepo(x); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if exists {
|
||||
// Create tracked time out of the time difference between start date and actual date
|
||||
timediff := time.Now().Unix() - int64(sw.CreatedUnix)
|
||||
@@ -112,6 +116,10 @@ func CancelStopwatch(user *User, issue *Issue) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := issue.loadRepo(x); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := CreateComment(&CreateCommentOptions{
|
||||
Doer: user,
|
||||
Issue: issue,
|
||||
|
Reference in New Issue
Block a user