Skip to content

Commit 495903f

Browse files
Mai-LapystAbdulrhmnGhanem
authored andcommitted
Fixing wrong paging when filtering on the issue dashboard (go-gitea#19801)
Fixes go-gitea#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 go-gitea#19791
1 parent 99703aa commit 495903f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

routers/web/user/home.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
610610
shownIssues = int(issueStats.ClosedCount)
611611
ctx.Data["TotalIssueCount"] = shownIssues
612612
}
613+
if len(repoIDs) != 0 {
614+
shownIssues = 0
615+
for _, repoID := range repoIDs {
616+
shownIssues += int(issueCountByRepo[repoID])
617+
}
618+
}
613619

614620
ctx.Data["IsShowClosed"] = isShowClosed
615621

0 commit comments

Comments
 (0)