summaryrefslogtreecommitdiff
path: root/tagWindow.go
diff options
context:
space:
mode:
Diffstat (limited to 'tagWindow.go')
-rw-r--r--tagWindow.go20
1 files changed, 4 insertions, 16 deletions
diff --git a/tagWindow.go b/tagWindow.go
index d5e33b8..f40aa9d 100644
--- a/tagWindow.go
+++ b/tagWindow.go
@@ -47,14 +47,7 @@ func makeTagWindow() *tagWindow {
me.autotypistWindow.Disable()
defer me.autotypistWindow.Enable()
for _, repo := range me.allrepos {
- tagsW := repo.status.TagsW
- if tagsW == nil {
- repo.status.TagWindow()
- tagsW = repo.status.TagsW
- // tagsW.Prune()
- continue
- }
- allTags := tagsW.ListAll()
+ allTags := repo.status.Tags.ListAll()
for _, t := range allTags {
log.Info("found tag:", t.TagString(), "from", repo.status.String())
}
@@ -70,26 +63,21 @@ func makeTagWindow() *tagWindow {
} else {
// continue
}
- tagsW := repo.status.TagsW
- if tagsW == nil {
- repo.status.TagWindow()
- tagsW = repo.status.TagsW
- continue
- }
+ tagsW := repo.status.Tags
tagsW.PruneSmart()
deleteTags := tagsW.List()
for _, t := range deleteTags {
tagW.grid.NewLabel(t.TagString())
tagW.grid.NewLabel(repo.status.String())
tagW.grid.NewButton("delete", func() {
- tagsW.Delete(t)
+ repo.status.DeleteTag(t)
})
tagW.grid.NextRow()
if me.autoDryRun.Checked() {
log.Info("delete tag --dry-run:", t.TagString(), "from", repo.status.String())
} else {
log.Info("Deleting tag:", t.TagString(), "from", repo.status.String())
- go tagsW.Delete(t)
+ go repo.status.DeleteTag(t)
log.Sleep(1)
}
}