mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix #199
This commit is contained in:
parent
9961f9a53c
commit
fb0972afad
5 changed files with 12 additions and 7 deletions
|
@ -23,7 +23,12 @@ func (rs *ReleaseSorter) Len() int {
|
|||
}
|
||||
|
||||
func (rs *ReleaseSorter) Less(i, j int) bool {
|
||||
return rs.rels[i].NumCommits > rs.rels[j].NumCommits
|
||||
diffNum := rs.rels[i].NumCommits - rs.rels[j].NumCommits
|
||||
if diffNum != 0 {
|
||||
return diffNum > 0
|
||||
}
|
||||
|
||||
return rs.rels[i].Created.Second() > rs.rels[j].Created.Second()
|
||||
}
|
||||
|
||||
func (rs *ReleaseSorter) Swap(i, j int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue