diff --git a/td/telegram/Photo.cpp b/td/telegram/Photo.cpp index d99dcb8f6..2a8326294 100644 --- a/td/telegram/Photo.cpp +++ b/td/telegram/Photo.cpp @@ -585,6 +585,9 @@ static vector> get_photo_sizes_object(File return static_cast(lhs->width_) * static_cast(lhs->height_) < static_cast(rhs->width_) * static_cast(rhs->height_); }); + td::remove_if(sizes, [](const auto &size) { + return !size->photo_->local_->can_be_downloaded_ && !size->photo_->local_->is_downloading_completed_; + }); return sizes; }