Make dashboard newsfeed list length a configurable item (#12469)

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
techknowlogick
2020-08-11 10:48:13 -04:00
committed by GitHub
parent 73b155d5f2
commit 22c952ac7a
4 changed files with 7 additions and 2 deletions

View File

@ -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)
}