summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-08-11 10:48:13 -0400
committerGitHub <noreply@github.com>2020-08-11 10:48:13 -0400
commit22c952ac7a6cfb5e4fd8ab536cbfef1543b1be91 (patch)
treecc7a278ce1bd3a2dbfea28567b12b1e46b1debc6 /models
parent73b155d5f21813abc788a54aee0ee72459e7c7c9 (diff)
downloadgitea-22c952ac7a6cfb5e4fd8ab536cbfef1543b1be91.tar.gz
gitea-22c952ac7a6cfb5e4fd8ab536cbfef1543b1be91.zip
Make dashboard newsfeed list length a configurable item (#12469)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'models')
-rw-r--r--models/action.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index d6dbcdc671..f4d163afa3 100644
--- a/models/action.go
+++ b/models/action.go
@@ -339,9 +339,9 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
cond = cond.And(builder.Eq{"is_deleted": false})
}
- actions := make([]*Action, 0, 20)
+ actions := make([]*Action, 0, setting.UI.FeedPagingNum)
- if err := x.Limit(20).Desc("id").Where(cond).Find(&actions); err != nil {
+ if err := x.Limit(setting.UI.FeedPagingNum).Desc("id").Where(cond).Find(&actions); err != nil {
return nil, fmt.Errorf("Find: %v", err)
}