| 270 | } |
| 271 | |
| 272 | void Uploader::sendProgressUpdate( |
| 273 | not_null<HistoryItem*> item, |
| 274 | Api::SendProgressType type, |
| 275 | int progress) { |
| 276 | const auto history = item->history(); |
| 277 | auto &manager = _api->session().sendProgressManager(); |
| 278 | manager.update(history, type, progress); |
| 279 | if (const auto replyTo = item->replyToTop()) { |
| 280 | if (history->peer->isMegagroup()) { |
| 281 | manager.update(history, replyTo, type, progress); |
| 282 | } |
| 283 | } else if (history->isForum()) { |
| 284 | manager.update(history, item->topicRootId(), type, progress); |
| 285 | } |
| 286 | _api->session().data().requestItemRepaint(item); |
| 287 | } |
| 288 | |
| 289 | Uploader::~Uploader() { |
| 290 | clear(); |
nothing calls this directly
no test coverage detected