Browse Source

add type for activity

pull/93/head
lewis 4 years ago
parent
commit
79c506feb0
2 changed files with 14 additions and 8 deletions
  1. +7
    -7
      routers/user/home.go
  2. +7
    -1
      routers/user/profile.go

+ 7
- 7
routers/user/home.go View File

@@ -145,13 +145,13 @@ func Dashboard(ctx *context.Context) {
ctx.Data["MirrorCount"] = len(mirrors) ctx.Data["MirrorCount"] = len(mirrors)
ctx.Data["Mirrors"] = mirrors ctx.Data["Mirrors"] = mirrors


retrieveFeeds(ctx, models.GetFeedsOptions{
RequestedUser: ctxUser,
Actor: ctx.User,
IncludePrivate: true,
OnlyPerformedBy: false,
IncludeDeleted: false,
})
//retrieveFeeds(ctx, models.GetFeedsOptions{
// RequestedUser: ctxUser,
// Actor: ctx.User,
// IncludePrivate: true,
// OnlyPerformedBy: false,
// IncludeDeleted: false,
//})


if ctx.Written() { if ctx.Written() {
return return


+ 7
- 1
routers/user/profile.go View File

@@ -178,10 +178,16 @@ func Profile(ctx *context.Context) {


total = ctxUser.NumFollowing total = ctxUser.NumFollowing
case "activity": case "activity":
typeQuery := ctx.Query("type")
onlyPerformedBy := true
if typeQuery == "all" {
onlyPerformedBy = false
}
retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser, retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser,
Actor: ctx.User, Actor: ctx.User,
IncludePrivate: showPrivate, IncludePrivate: showPrivate,
OnlyPerformedBy: true,
OnlyPerformedBy: onlyPerformedBy,
IncludeDeleted: false, IncludeDeleted: false,
}) })
if ctx.Written() { if ctx.Written() {


Loading…
Cancel
Save