aboutsummaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
Diffstat (limited to 'termui')
-rw-r--r--termui/label_select.go2
-rw-r--r--termui/show_bug.go15
-rw-r--r--termui/termui.go4
3 files changed, 11 insertions, 10 deletions
diff --git a/termui/label_select.go b/termui/label_select.go
index d5ea5bd3..2282583d 100644
--- a/termui/label_select.go
+++ b/termui/label_select.go
@@ -7,8 +7,8 @@ import (
"github.com/awesome-gocui/gocui"
- "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entities/bug"
)
const labelSelectView = "labelSelectView"
diff --git a/termui/show_bug.go b/termui/show_bug.go
index 528d1fa5..8bcae842 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -9,8 +9,9 @@ import (
text "github.com/MichaelMure/go-term-text"
"github.com/awesome-gocui/gocui"
- "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entities/bug"
+ "github.com/MichaelMure/git-bug/entities/common"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/util/colors"
)
@@ -243,7 +244,7 @@ func (sb *showBug) renderMain(g *gocui.Gui, mainView *gocui.View) error {
y0 += lines + 1
for _, op := range snap.Timeline {
- viewName := op.Id().String()
+ viewName := op.CombinedId().String()
// TODO: me might skip the rendering of blocks that are outside of the view
// but to do that we need to rework how sb.mainSelectableView is maintained
@@ -624,10 +625,10 @@ func (sb *showBug) setTitle(g *gocui.Gui, v *gocui.View) error {
func (sb *showBug) toggleOpenClose(g *gocui.Gui, v *gocui.View) error {
switch sb.bug.Snapshot().Status {
- case bug.OpenStatus:
+ case common.OpenStatus:
_, err := sb.bug.Close()
return err
- case bug.ClosedStatus:
+ case common.ClosedStatus:
_, err := sb.bug.Open()
return err
default:
@@ -646,16 +647,16 @@ func (sb *showBug) edit(g *gocui.Gui, v *gocui.View) error {
return nil
}
- op, err := snap.SearchTimelineItem(entity.Id(sb.selected))
+ op, err := snap.SearchTimelineItem(entity.CombinedId(sb.selected))
if err != nil {
return err
}
switch op := op.(type) {
case *bug.AddCommentTimelineItem:
- return editCommentWithEditor(sb.bug, op.Id(), op.Message)
+ return editCommentWithEditor(sb.bug, op.CombinedId(), op.Message)
case *bug.CreateTimelineItem:
- return editCommentWithEditor(sb.bug, op.Id(), op.Message)
+ return editCommentWithEditor(sb.bug, op.CombinedId(), op.Message)
case *bug.LabelChangeTimelineItem:
return sb.editLabels(g, snap)
}
diff --git a/termui/termui.go b/termui/termui.go
index 3e7f43b9..15476d89 100644
--- a/termui/termui.go
+++ b/termui/termui.go
@@ -8,8 +8,8 @@ import (
"github.com/pkg/errors"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/commands/input"
"github.com/MichaelMure/git-bug/entity"
- "github.com/MichaelMure/git-bug/input"
"github.com/MichaelMure/git-bug/query"
"github.com/MichaelMure/git-bug/util/text"
)
@@ -250,7 +250,7 @@ func addCommentWithEditor(bug *cache.BugCache) error {
return errTerminateMainloop
}
-func editCommentWithEditor(bug *cache.BugCache, target entity.Id, preMessage string) error {
+func editCommentWithEditor(bug *cache.BugCache, target entity.CombinedId, preMessage string) error {
// This is somewhat hacky.
// As there is no way to pause gocui, run the editor and restart gocui,
// we have to stop it entirely and start a new one later.