forked from forgejo/forgejo
Add pagination for dashboard and user activity feeds (#22937)
Previously only the last few activities where available. This works for all activity and for activity on a date chosen on the heatmap.
This commit is contained in:
parent
740a5ecdd9
commit
f4920c9c7f
9 changed files with 81 additions and 32 deletions
|
@ -73,7 +73,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
|
|||
}
|
||||
|
||||
// get the action for comparison
|
||||
actions, err := activities_model.GetFeeds(db.DefaultContext, activities_model.GetFeedsOptions{
|
||||
actions, count, err := activities_model.GetFeeds(db.DefaultContext, activities_model.GetFeedsOptions{
|
||||
RequestedUser: user,
|
||||
Actor: doer,
|
||||
IncludePrivate: true,
|
||||
|
@ -90,6 +90,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
|
|||
}
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, actions, contributions, "invalid action count: did the test data became too old?")
|
||||
assert.Equal(t, count, int64(contributions))
|
||||
assert.Equal(t, tc.CountResult, contributions, fmt.Sprintf("testcase '%s'", tc.desc))
|
||||
|
||||
// Test JSON rendering
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue