Skip to content

Commit 085a44e

Browse files
committed
fix ui
1 parent 5343ec1 commit 085a44e

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

routers/web/user/home.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -444,21 +444,6 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
444444
repoOpts.TeamID = team.ID
445445
}
446446

447-
switch filterMode {
448-
case issues_model.FilterModeAll:
449-
case issues_model.FilterModeYourRepositories:
450-
case issues_model.FilterModeAssign:
451-
opts.AssigneeID = ctx.Doer.ID
452-
case issues_model.FilterModeCreate:
453-
opts.PosterID = ctx.Doer.ID
454-
case issues_model.FilterModeMention:
455-
opts.MentionedID = ctx.Doer.ID
456-
case issues_model.FilterModeReviewRequested:
457-
opts.ReviewRequestedID = ctx.Doer.ID
458-
case issues_model.FilterModeReviewed:
459-
opts.ReviewedID = ctx.Doer.ID
460-
}
461-
462447
// keyword holds the search term entered into the search field.
463448
keyword := strings.Trim(ctx.FormString("q"), " ")
464449
ctx.Data["Keyword"] = keyword
@@ -495,6 +480,23 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
495480
}
496481
}
497482

483+
// In order to display all issues count in repo filter,
484+
// we need to check filterMode after CountIssuesByRepo
485+
switch filterMode {
486+
case issues_model.FilterModeAll:
487+
case issues_model.FilterModeYourRepositories:
488+
case issues_model.FilterModeAssign:
489+
opts.AssigneeID = ctx.Doer.ID
490+
case issues_model.FilterModeCreate:
491+
opts.PosterID = ctx.Doer.ID
492+
case issues_model.FilterModeMention:
493+
opts.MentionedID = ctx.Doer.ID
494+
case issues_model.FilterModeReviewRequested:
495+
opts.ReviewRequestedID = ctx.Doer.ID
496+
case issues_model.FilterModeReviewed:
497+
opts.ReviewedID = ctx.Doer.ID
498+
}
499+
498500
// Make sure page number is at least 1. Will be posted to ctx.Data.
499501
page := ctx.FormInt("page")
500502
if page <= 1 {

0 commit comments

Comments
 (0)