[ios] Display fractional download progress

Instead of 0% now user sees 0.14%

Rationale: for very slow connections it helps to see that download is not stale
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-07-02 23:30:14 +02:00 committed by Alexander Borsuk
parent b79c671fcf
commit 1adf6ecdd0

View file

@ -195,7 +195,7 @@ using namespace storage;
- (void)showDownloading:(CGFloat)progress {
self.nodeSize.textColor = [UIColor blackSecondaryText];
self.nodeSize.text =
[NSString stringWithFormat:@"%@ %@%%", L(@"downloader_downloading"), @((NSInteger)(progress * 100.f))];
[NSString stringWithFormat:@"%@ %.2f%%", L(@"downloader_downloading"), progress * 100.f];
self.downloadButton.hidden = YES;
self.progressWrapper.hidden = NO;
self.progress.progress = progress;