summaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2023-02-17 08:13:35 +0100
committerGitHub <noreply@github.com>2023-02-17 15:13:35 +0800
commitca445cf56628274ab5119816bf988f04204035a3 (patch)
tree48b198ed3aa951b8ef1c560457bf44359f69068e /routers/web
parent5a12e95d2a3bc3dcc017dfce0cb1b77b0736e6f4 (diff)
downloadgitea-ca445cf56628274ab5119816bf988f04204035a3.tar.gz
gitea-ca445cf56628274ab5119816bf988f04204035a3.zip
Sort issues and pulls by recently updated in user and organization home (#22925)
The main purpose of these home pages should be getting an overview of what's going on or needs attention. Recently updated is a better default than newest for that purpose, to avoid missing active issues and pulls that were not created recently. The default sorting order in repository issues and pulls remains newest. Repositories in an organization are already sorted by recently updated. --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/user/home.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index 36d9d4f019..4f45c1d5c3 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -338,6 +338,11 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
filterMode int
)
+ // Default to recently updated, unlike repository issues list
+ if sortType == "" {
+ sortType = "recentupdate"
+ }
+
// --------------------------------------------------------------------------------
// Distinguish User from Organization.
// Org: