Fix branch pagination error (#16805)

Fix #16801

Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
This commit is contained in:
Lunny Xiao authored and GitHub committed 2021-08-24 23:15:07 +01:00
1 parent efaf109435
commit 4e761fa385
1 file changed
+1 -1
+1 -1
View File
@@ -217,7 +217,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) {
branches = append(branches, deletedBranches...)
}
return branches, totalNumOfBranches - 1
return branches, totalNumOfBranches
}
func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch,