diff options
author | Mai-Lapyst <67418776+Mai-Lapyst@users.noreply.github.com> | 2022-06-04 22:12:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-04 21:12:14 +0100 |
commit | 090d89e0f9db2bbbe6bc63d887647e2f898c0a18 (patch) | |
tree | 84012c8dd4b29f126c3a8656b2f6052b60b47a5a /routers/web/user/home.go | |
parent | 744e45218579fe2fd130b91d9fb95ec4becd314d (diff) | |
download | gitea-090d89e0f9db2bbbe6bc63d887647e2f898c0a18.tar.gz gitea-090d89e0f9db2bbbe6bc63d887647e2f898c0a18.zip |
Fixing wrong paging when filtering on the issue dashboard (#19801)
Fixes #19791 by adding an check if filtering after any repo; if yes, simply set the total count for the pageing to the sum of the issue count for each selected repo by utilize `issueCountByRepo`.
Fix #19791
Diffstat (limited to 'routers/web/user/home.go')
-rw-r--r-- | routers/web/user/home.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 297d76d4aa..1412f6cfef 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -610,6 +610,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) { shownIssues = int(issueStats.ClosedCount) ctx.Data["TotalIssueCount"] = shownIssues } + if len(repoIDs) != 0 { + shownIssues = 0 + for _, repoID := range repoIDs { + shownIssues += int(issueCountByRepo[repoID]) + } + } ctx.Data["IsShowClosed"] = isShowClosed |