aboutsummaryrefslogtreecommitdiffstats
path: root/termui/bug_table.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-02 16:36:48 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-02 16:36:48 +0200
commit0728c0050d82171659474900c407e1b6dcee43a5 (patch)
tree73473697a596bb0e93b30ab9a68fd25e7c3af98c /termui/bug_table.go
parente3c445fa85db65b084580a38b919f17b8f8c2b68 (diff)
downloadgit-bug-0728c0050d82171659474900c407e1b6dcee43a5.tar.gz
cache: provide a generic bug sorting function
Diffstat (limited to 'termui/bug_table.go')
-rw-r--r--termui/bug_table.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go
index 00b0ffb4..55c7a2d5 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -212,7 +212,7 @@ func (bt *bugTable) disable(g *gocui.Gui) error {
}
func (bt *bugTable) paginate(max int) error {
- bt.allIds = bt.repo.AllBugsOrderByCreation()
+ bt.allIds = bt.repo.AllBugsId(cache.OrderByCreation, cache.OrderAscending)
return bt.doPaginate(max)
}
@@ -355,8 +355,6 @@ func (bt *bugTable) cursorClamp(v *gocui.View) error {
func (bt *bugTable) nextPage(g *gocui.Gui, v *gocui.View) error {
_, max := v.Size()
- bt.allIds = bt.repo.AllBugsOrderByCreation()
-
if bt.pageCursor+max >= len(bt.allIds) {
return nil
}
@@ -369,8 +367,6 @@ func (bt *bugTable) nextPage(g *gocui.Gui, v *gocui.View) error {
func (bt *bugTable) previousPage(g *gocui.Gui, v *gocui.View) error {
_, max := v.Size()
- bt.allIds = bt.repo.AllBugsOrderByCreation()
-
bt.pageCursor = maxInt(0, bt.pageCursor-max)
return bt.doPaginate(max)