From efc05dee907cb764c659cf8f8a92d2c2652ce74d Mon Sep 17 00:00:00 2001 From: Sam Coe Date: Wed, 9 Dec 2020 13:50:08 -0500 Subject: [PATCH] Use spinner helper --- pkg/cmd/issue/view/view.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkg/cmd/issue/view/view.go b/pkg/cmd/issue/view/view.go index 063be82c8..d8754edcb 100644 --- a/pkg/cmd/issue/view/view.go +++ b/pkg/cmd/issue/view/view.go @@ -8,7 +8,6 @@ import ( "time" "github.com/MakeNowJust/heredoc" - "github.com/briandowns/spinner" "github.com/cli/cli/api" "github.com/cli/cli/internal/config" "github.com/cli/cli/internal/ghrepo" @@ -93,21 +92,13 @@ func viewRun(opts *ViewOptions) error { } if opts.Comments { - var s *spinner.Spinner - if opts.IO.IsStdoutTTY() { - s = utils.Spinner(opts.IO.ErrOut) - utils.StartSpinner(s) - } - + opts.IO.StartProgressIndicator() comments, err := api.CommentsForIssue(apiClient, repo, issue) + opts.IO.StopProgressIndicator() if err != nil { return err } issue.Comments = *comments - - if opts.IO.IsStdoutTTY() { - utils.StopSpinner(s) - } } opts.IO.DetectTerminalTheme()