aboutsummaryrefslogtreecommitdiff
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-16 20:25:28 -0400
committerUnknwon <u@gogs.io>2017-03-16 20:25:28 -0400
commit07a9cbe0a9ab8b25af079b8bd4d2c43f64cc0c03 (patch)
tree6bddbef597417ce0a8e8ac23a70283fdafa4bc68 /routers
parent7c802f6d83b50e5a647fbf667c25480d67f4791f (diff)
setting: able to config dashboard news feed paging number (#4247)
Diffstat (limited to 'routers')
-rw-r--r--routers/user/home.go6
1 files changed, 3 insertions, 3 deletions
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
}