Make dashboard newsfeed list length a configurable item (#12469)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
73b155d5f2
commit
22c952ac7a
4 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue