fwupd/SOURCES/0004-Do-not-show-Unknown-fo...

34 lines
1013 B
Diff

From 002863121ed42f33507ce5663a3b22fabdfa5c36 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Thu, 14 Jan 2021 10:03:51 +0000
Subject: [PATCH 04/11] Do not show Unknown [***] for every client connection
Ignore the initial client state change from UNKNOWN to IDLE which was being set
as part of the fix in fb36f22.
Fixes https://github.com/fwupd/fwupd/issues/2766
---
src/fu-progressbar.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git src/fu-progressbar.c src/fu-progressbar.c
index 9a7378c5..5dd9ff39 100644
--- src/fu-progressbar.c
+++ src/fu-progressbar.c
@@ -297,6 +297,12 @@ fu_progressbar_update (FuProgressbar *self, FwupdStatus status, guint percentage
{
g_return_if_fail (FU_IS_PROGRESSBAR (self));
+ /* ignore initial client connection */
+ if (self->status == FWUPD_STATUS_UNKNOWN && status == FWUPD_STATUS_IDLE) {
+ self->status = status;
+ return;
+ }
+
/* use cached value */
if (status == FWUPD_STATUS_UNKNOWN)
status = self->status;
--
2.29.2