mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 06:38:37 -04:00 
			
		
		
		
	fix #139
This commit is contained in:
		| @@ -163,11 +163,23 @@ func Profile(ctx *middleware.Context) { | |||||||
| 	ctx.Data["TabName"] = tab | 	ctx.Data["TabName"] = tab | ||||||
| 	switch tab { | 	switch tab { | ||||||
| 	case "activity": | 	case "activity": | ||||||
| 		ctx.Data["Feeds"], err = models.GetFeeds(u.Id, 0, true) | 		actions, err := models.GetFeeds(u.Id, 0, false) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			ctx.Handle(500, "GetFeeds", err) | 			ctx.Handle(500, "GetFeeds", err) | ||||||
| 			return | 			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: | 	default: | ||||||
| 		ctx.Data["Repos"], err = models.GetRepositories(u.Id, ctx.IsSigned && ctx.User.Id == u.Id) | 		ctx.Data["Repos"], err = models.GetRepositories(u.Id, ctx.IsSigned && ctx.User.Id == u.Id) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user