mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
fix #139
This commit is contained in:
parent
55dfe2c978
commit
22ab4fa1b0
1 changed files with 13 additions and 1 deletions
|
@ -163,11 +163,23 @@ func Profile(ctx *middleware.Context) {
|
|||
ctx.Data["TabName"] = tab
|
||||
switch tab {
|
||||
case "activity":
|
||||
ctx.Data["Feeds"], err = models.GetFeeds(u.Id, 0, true)
|
||||
actions, err := models.GetFeeds(u.Id, 0, false)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetFeeds", err)
|
||||
return
|
||||
}
|
||||
feeds := make([]*models.Action, 0, len(actions))
|
||||
for _, act := range actions {
|
||||
// FIXME: cache results?
|
||||
u, err := models.GetUserByName(act.ActUserName)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetUserByName", err)
|
||||
return
|
||||
}
|
||||
act.ActAvatar = u.AvatarLink()
|
||||
feeds = append(feeds, act)
|
||||
}
|
||||
ctx.Data["Feeds"] = feeds
|
||||
default:
|
||||
ctx.Data["Repos"], err = models.GetRepositories(u.Id, ctx.IsSigned && ctx.User.Id == u.Id)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue