aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJonas Franz <info@jonasfranz.software>2017-06-25 20:20:29 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-06-25 20:20:29 +0200
commit441986a473a666e0a6a34ec49c50b5aa19245cf8 (patch)
tree67d45e4b2268a896649ef093cdd0b01ffed5aa1e /routers
parent735676267e48e6a57b250825e2e77edbb513e11d (diff)
downloadgitea-441986a473a666e0a6a34ec49c50b5aa19245cf8.tar.gz
gitea-441986a473a666e0a6a34ec49c50b5aa19245cf8.zip
Fix "Dashboard shows deleted comments" (#1995)
Diffstat (limited to 'routers')
-rw-r--r--routers/user/home.go5
-rw-r--r--routers/user/profile.go2
2 files changed, 4 insertions, 3 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 9ff03cf04f..7128890690 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -54,7 +54,7 @@ func getDashboardContextUser(ctx *context.Context) *models.User {
}
// retrieveFeeds loads feeds for the specified user
-func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isProfile bool) {
+func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isProfile bool, includeDeletedComments bool) {
var requestingID int64
if ctx.User != nil {
requestingID = ctx.User.ID
@@ -64,6 +64,7 @@ func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isPr
RequestingUserID: requestingID,
IncludePrivate: includePrivate,
OnlyPerformedBy: isProfile,
+ IncludeDeleted: includeDeletedComments,
})
if err != nil {
ctx.Handle(500, "GetFeeds", err)
@@ -186,7 +187,7 @@ func Dashboard(ctx *context.Context) {
ctx.Data["MirrorCount"] = len(mirrors)
ctx.Data["Mirrors"] = mirrors
- retrieveFeeds(ctx, ctxUser, true, false)
+ retrieveFeeds(ctx, ctxUser, true, false, false)
if ctx.Written() {
return
}
diff --git a/routers/user/profile.go b/routers/user/profile.go
index 1768cec7b1..c7d761052e 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -138,7 +138,7 @@ func Profile(ctx *context.Context) {
ctx.Data["Keyword"] = keyword
switch tab {
case "activity":
- retrieveFeeds(ctx, ctxUser, showPrivate, true)
+ retrieveFeeds(ctx, ctxUser, showPrivate, true, false)
if ctx.Written() {
return
}