From 1a115cc7e538e3d0c4a938d98693b7994e1e851a Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 27 Dec 2017 21:57:07 +0300 Subject: [PATCH] Fix file upload progress display. Regression was introduced in 5d18d7c813. --- Telegram/SourceFiles/storage/file_upload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/storage/file_upload.cpp b/Telegram/SourceFiles/storage/file_upload.cpp index 16c2e3219..98bb8af88 100644 --- a/Telegram/SourceFiles/storage/file_upload.cpp +++ b/Telegram/SourceFiles/storage/file_upload.cpp @@ -476,7 +476,7 @@ void Uploader::partLoaded(const MTPBool &result, mtpRequestId requestId) { if (document->uploading()) { const auto doneParts = file.docSentParts - int(docRequestsSent.size()); - document->uploadingData->offset = std::max( + document->uploadingData->offset = std::min( document->uploadingData->size, doneParts * file.docPartSize); }