diff options
author | Michael Muré <batolettre@gmail.com> | 2024-08-25 20:40:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 18:40:23 +0000 |
commit | 3a4b8805dfd794cc25f57e99c73ddec651805af1 (patch) | |
tree | b6af67c761c96b323400d061db22ceed73fb0bb0 /termui/label_select.go | |
parent | c3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff) | |
download | git-bug-3a4b8805dfd794cc25f57e99c73ddec651805af1.tar.gz |
core: make label a common type, in a similar fashion as for status (#1252)
This will be useful for Board, and likely code review support later
Diffstat (limited to 'termui/label_select.go')
-rw-r--r-- | termui/label_select.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/termui/label_select.go b/termui/label_select.go index 5ae1c09a..6e3503b9 100644 --- a/termui/label_select.go +++ b/termui/label_select.go @@ -8,7 +8,7 @@ import ( "github.com/awesome-gocui/gocui" "github.com/git-bug/git-bug/cache" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) const labelSelectView = "labelSelectView" @@ -23,7 +23,7 @@ var labelSelectHelp = helpBar{ type labelSelect struct { cache *cache.RepoCache bug *cache.BugCache - labels []bug.Label + labels []common.Label labelSelect []bool selected int scroll int @@ -254,7 +254,7 @@ func (ls *labelSelect) addItem(g *gocui.Gui, v *gocui.View) error { } // Add new label, make it selected, and focus - ls.labels = append(ls.labels, bug.Label(input)) + ls.labels = append(ls.labels, common.Label(input)) ls.labelSelect = append(ls.labelSelect, true) ls.selected = len(ls.labels) - 1 @@ -272,7 +272,7 @@ func (ls *labelSelect) abort(g *gocui.Gui, v *gocui.View) error { func (ls *labelSelect) saveAndReturn(g *gocui.Gui, v *gocui.View) error { bugLabels := ls.bug.Snapshot().Labels - var selectedLabels []bug.Label + var selectedLabels []common.Label for i, label := range ls.labels { if ls.labelSelect[i] { selectedLabels = append(selectedLabels, label) |