mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
fix(search): revert repo query revert. Fixes #1623
This commit is contained in:
parent
57a9630054
commit
15d91e4661
@ -139,7 +139,7 @@ func queryRepo(pkgInputN []string, dbExecutor db.Executor, sortMode int) repoQue
|
||||
s := repoQuery(dbExecutor.SyncPackages(pkgInputN...))
|
||||
|
||||
if sortMode == settings.BottomUp {
|
||||
s = sort.Reverse(s).(repoQuery)
|
||||
s.Reverse()
|
||||
}
|
||||
|
||||
return s
|
||||
|
@ -24,12 +24,10 @@ type aurSortable struct {
|
||||
sortMode int
|
||||
}
|
||||
|
||||
func (r repoQuery) Len() int {
|
||||
return len(r)
|
||||
}
|
||||
|
||||
func (r repoQuery) Swap(i, j int) {
|
||||
r[i], r[j] = r[j], r[i]
|
||||
func (r repoQuery) Reverse() {
|
||||
for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 {
|
||||
r[i], r[j] = r[j], r[i]
|
||||
}
|
||||
}
|
||||
|
||||
func (r repoQuery) Less(i, j int) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user