Refactor notification for indexer (#5111)
* notification for indexer * use NullNotifier as parent struct
This commit is contained in:
@ -818,9 +818,6 @@ func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if opts.Type == CommentTypeComment {
|
||||
UpdateIssueIndexer(opts.Issue.ID)
|
||||
}
|
||||
return comment, nil
|
||||
}
|
||||
|
||||
@ -1022,8 +1019,6 @@ func GetCommentsByRepoIDSince(repoID, since int64) ([]*Comment, error) {
|
||||
func UpdateComment(doer *User, c *Comment, oldContent string) error {
|
||||
if _, err := x.ID(c.ID).AllCols().Update(c); err != nil {
|
||||
return err
|
||||
} else if c.Type == CommentTypeComment {
|
||||
UpdateIssueIndexer(c.IssueID)
|
||||
}
|
||||
|
||||
if err := c.LoadPoster(); err != nil {
|
||||
@ -1082,8 +1077,6 @@ func DeleteComment(doer *User, comment *Comment) error {
|
||||
|
||||
if err := sess.Commit(); err != nil {
|
||||
return err
|
||||
} else if comment.Type == CommentTypeComment {
|
||||
UpdateIssueIndexer(comment.IssueID)
|
||||
}
|
||||
|
||||
if err := comment.LoadPoster(); err != nil {
|
||||
|
Reference in New Issue
Block a user