diff options
author | Michael Muré <batolettre@gmail.com> | 2019-01-17 03:09:08 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:35:37 +0100 |
commit | bdbe9e7e8256fff820efe1ce707e7154d517ecb3 (patch) | |
tree | 82b86c7f89c6c9796b1c7b26beea350afa634d6f /termui | |
parent | 3df4f46c71650c9d23b267c44afec16f1b759e92 (diff) | |
download | git-bug-bdbe9e7e8256fff820efe1ce707e7154d517ecb3.tar.gz |
identity: more progress and fixes
Diffstat (limited to 'termui')
-rw-r--r-- | termui/bug_table.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go index ba946c86..69634151 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -6,7 +6,6 @@ import ( "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" - "github.com/MichaelMure/git-bug/identity" "github.com/MichaelMure/git-bug/util/colors" "github.com/MichaelMure/git-bug/util/text" "github.com/MichaelMure/gocui" @@ -290,12 +289,9 @@ func (bt *bugTable) render(v *gocui.View, maxX int) { columnWidths := bt.getColumnWidths(maxX) for _, b := range bt.bugs { - person := &identity.Identity{} snap := b.Snapshot() - if len(snap.Comments) > 0 { - create := snap.Comments[0] - person = create.Author - } + create := snap.Comments[0] + authorIdentity := create.Author summaryTxt := fmt.Sprintf("C:%-2d L:%-2d", len(snap.Comments)-1, @@ -305,7 +301,7 @@ func (bt *bugTable) render(v *gocui.View, maxX int) { id := text.LeftPadMaxLine(snap.HumanId(), columnWidths["id"], 1) status := text.LeftPadMaxLine(snap.Status.String(), columnWidths["status"], 1) title := text.LeftPadMaxLine(snap.Title, columnWidths["title"], 1) - author := text.LeftPadMaxLine(person.DisplayName(), columnWidths["author"], 1) + author := text.LeftPadMaxLine(authorIdentity.DisplayName(), columnWidths["author"], 1) summary := text.LeftPadMaxLine(summaryTxt, columnWidths["summary"], 1) lastEdit := text.LeftPadMaxLine(humanize.Time(snap.LastEditTime()), columnWidths["lastEdit"], 1) |