Skip to content

Commit fea1196

Browse files
authored
Merge branch 'main' into fix/fix-TestActionsCollaborativeOwner
2 parents 35b34c8 + 1ac4ad3 commit fea1196

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

routers/web/user/profile.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
103103
repos []*repo_model.Repository
104104
count int64
105105
total int
106+
curRows int
106107
orderBy db.SearchOrderBy
107108
)
108109

@@ -169,7 +170,7 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
169170
date := ctx.FormString("date")
170171
pagingNum = setting.UI.FeedPagingNum
171172
showPrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)
172-
items, count, err := feed_service.GetFeeds(ctx, activities_model.GetFeedsOptions{
173+
items, feedCount, err := feed_service.GetFeedsForDashboard(ctx, activities_model.GetFeedsOptions{
173174
RequestedUser: ctx.ContextUser,
174175
Actor: ctx.Doer,
175176
IncludePrivate: showPrivate,
@@ -187,8 +188,8 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
187188
}
188189
ctx.Data["Feeds"] = items
189190
ctx.Data["Date"] = date
190-
191-
total = int(count)
191+
curRows = len(items)
192+
total = feedCount
192193
case "stars":
193194
ctx.Data["PageIsProfileStarList"] = true
194195
ctx.Data["ShowRepoOwnerOnList"] = true
@@ -310,6 +311,9 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
310311
}
311312

312313
pager := context.NewPagination(total, pagingNum, page, 5)
314+
if tab == "activity" {
315+
pager.WithCurRows(curRows)
316+
}
313317
pager.AddParamFromRequest(ctx.Req)
314318
ctx.Data["Page"] = pager
315319
}

0 commit comments

Comments
 (0)