Skip to content

Commit a0c0cb3

Browse files
authored
Fix recentupdate sorting bugs (#32505)
Fix #32499 - Add the missing `recentupdate` to `OrderByFlatMap` - Assign default value(`recentupdate`) to `EXPLORE_PAGING_DEFAULT_SORT`
1 parent e1b269e commit a0c0cb3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

models/repo/search.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ var OrderByMap = map[string]map[string]db.SearchOrderBy{
3636
var OrderByFlatMap = map[string]db.SearchOrderBy{
3737
"newest": OrderByMap["desc"]["created"],
3838
"oldest": OrderByMap["asc"]["created"],
39+
"recentupdate": OrderByMap["desc"]["updated"],
3940
"leastupdate": OrderByMap["asc"]["updated"],
4041
"reversealphabetically": OrderByMap["desc"]["alpha"],
4142
"alphabetically": OrderByMap["asc"]["alpha"],

modules/setting/ui.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ var UI = struct {
8686
Reactions: []string{`+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket`, `eyes`},
8787
CustomEmojis: []string{`git`, `gitea`, `codeberg`, `gitlab`, `github`, `gogs`},
8888
CustomEmojisMap: map[string]string{"git": ":git:", "gitea": ":gitea:", "codeberg": ":codeberg:", "gitlab": ":gitlab:", "github": ":github:", "gogs": ":gogs:"},
89+
ExploreDefaultSort: "recentupdate",
8990
PreferredTimestampTense: "mixed",
9091

9192
AmbiguousUnicodeDetection: true,

0 commit comments

Comments
 (0)