From 07a9cbe0a9ab8b25af079b8bd4d2c43f64cc0c03 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Mar 2017 20:25:28 -0400 Subject: setting: able to config dashboard news feed paging number (#4247) --- routers/user/home.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers') diff --git a/routers/user/home.go b/routers/user/home.go index 39123da2..5dc83466 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -52,8 +52,8 @@ func getDashboardContextUser(ctx *context.Context) *models.User { // retrieveFeeds loads feeds from database by given context user. // The user could be organization so it is not always the logged in user, // which is why we have to explicitly pass the context user ID. -func retrieveFeeds(ctx *context.Context, ctxUser *models.User, userID, offset int64, isProfile bool) { - actions, err := models.GetFeeds(ctxUser, userID, offset, isProfile) +func retrieveFeeds(ctx *context.Context, ctxUser *models.User, userID int64, page int, isProfile bool) { + actions, err := models.GetFeeds(ctxUser, userID, page, isProfile) if err != nil { ctx.Handle(500, "GetFeeds", err) return @@ -143,7 +143,7 @@ func Dashboard(ctx *context.Context) { ctx.Data["MirrorCount"] = len(mirrors) ctx.Data["Mirrors"] = mirrors - retrieveFeeds(ctx, ctxUser, ctx.User.ID, 0, false) + retrieveFeeds(ctx, ctxUser, ctx.User.ID, 1, false) if ctx.Written() { return } -- cgit v1.2.3