From 5ae6a323aceb6d6f6e9b216ca137e0a398112edc Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Mon, 19 Aug 2019 09:58:22 -0700 Subject: [PATCH] Cleanup macos launcher download spam --- launchers/darwin/src/DownloadInterface.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/launchers/darwin/src/DownloadInterface.m b/launchers/darwin/src/DownloadInterface.m index f0bdb645da..234d807d9f 100644 --- a/launchers/darwin/src/DownloadInterface.m +++ b/launchers/darwin/src/DownloadInterface.m @@ -21,7 +21,10 @@ -(void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { CGFloat prog = (float)totalBytesWritten/totalBytesExpectedToWrite; - NSLog(@"interface downloaded %d%%", (int)(100.0*prog)); + + if ((int)(100.0 * prog) != (int)self.progressPercentage) { + NSLog(@"interface downloaded %d%%", (int)(100.0*prog)); + } self.progressPercentage = (100.0 * prog); [[Launcher sharedLauncher] updateProgressIndicator];