Fix incorrect release count (#25879)

Release count is not correct:
https://try.gitea.io/yp05327/testrepo/tags

![image](07f97c62-d450-4ccb-b3f2-3e0af9d9fc52)

https://try.gitea.io/yp05327/testrepo/releases

![image](6f1d55a4-bb68-445d-84b9-90552a40f403)

https://try.gitea.io/yp05327/testrepo/releases/tag/testtag

![image](09ab5d51-52b6-4621-a571-3100198eb260)

We already have correct release count, no need to calculate it again.

c5e187c389/modules/context/repo.go (L547)

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
yp05327 2023-07-14 17:47:17 +09:00 committed by GitHub
parent 1c8073b483
commit dc679fc9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -196,7 +196,6 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
}
ctx.Data["Releases"] = releases
ctx.Data["ReleasesNum"] = len(releases)
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
pager.SetDefaultParams(ctx)