From c5518c6537cb91b3037f3c6963a4a223cac7b64e Mon Sep 17 00:00:00 2001 From: Foglio Date: Mon, 3 Jun 2024 22:35:15 +0200 Subject: [PATCH] don't show progress of icons.zip download --- TCC.Core/Update/IconsUpdater.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TCC.Core/Update/IconsUpdater.cs b/TCC.Core/Update/IconsUpdater.cs index fffa0297..26a686d6 100644 --- a/TCC.Core/Update/IconsUpdater.cs +++ b/TCC.Core/Update/IconsUpdater.cs @@ -93,12 +93,13 @@ private async Task DownloadArchive() c.DownloadProgressChanged += (read, total) => { - if (total == -1) total = 71000000; + //if (total == -1) total = 71000000; var perc = read * 100 / (double)total; if (_n == null) return; _n.Progress = perc; - _n.Message = - $"Downloading icons...\n({read / (1024 * 1024D):N1}/{total / (1024 * 1024D):N1}MB)"; + _n.Message = total != -1 ? + $"Downloading icons...\n({read / (1024 * 1024D):N1}/{total / (1024 * 1024D):N1}MB)" + : $"Downloading icons...\n({read / (1024 * 1024D):N1}MB)"; }; c.DownloadFileCompleted += async (success) => {