Refactor compare diff/pull page (1) (#37481)
1. Rename CompareInfo.MergeBase to CompareBase, it is not merge base 2. Remove unused template variables `ctx.Data["Username"]` and `ctx.Data["Reponame"]` 3. Decouple some template variable accesses, use typed struct --------- Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
@@ -169,7 +169,7 @@ func UpdateResolveConversation(ctx *context.Context) {
|
||||
func renderConversation(ctx *context.Context, comment *issues_model.Comment, origin string) {
|
||||
ctx.Data["PageIsPullFiles"] = origin == "diff"
|
||||
|
||||
showOutdatedComments := origin == "timeline" || ctx.Data["ShowOutdatedComments"].(bool)
|
||||
showOutdatedComments := origin == "timeline" || GetShowOutdatedComments(ctx)
|
||||
comments, err := issues_model.FetchCodeCommentsByLine(ctx, comment.Issue, ctx.Doer, comment.TreePath, comment.Line, showOutdatedComments)
|
||||
if err != nil {
|
||||
ctx.ServerError("FetchCodeCommentsByLine", err)
|
||||
|
||||
Reference in New Issue
Block a user