From a85abe8bae7a542c6fe092719c66ed592dbe30b4 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 12 Oct 2018 22:16:11 +0200 Subject: [PATCH] client/status: improve hiding of data if current state makes it obsolete --- client/status.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/status.go b/client/status.go index d56773e..7ecb986 100644 --- a/client/status.go +++ b/client/status.go @@ -264,7 +264,8 @@ func (t *tui) renderReplicationReport(rep *replication.Report) { t.printf("Problem: %s", rep.Problem) t.newline() } - if rep.SleepUntil.After(time.Now()) { + if rep.SleepUntil.After(time.Now()) && + state & ^(replication.ContextDone|replication.Completed) != 0 { t.printf("Sleeping until %s (%s left)\n", rep.SleepUntil, rep.SleepUntil.Sub(time.Now())) } @@ -338,7 +339,10 @@ func (t *tui) renderPrunerReport(r *pruner.Report) { all = append(all, commonFS{&r.Completed[i], true}) } - if r.State == pruner.Plan.String() { + switch state { + case pruner.Plan: fallthrough + case pruner.PlanWait: fallthrough + case pruner.ErrPerm: return }