MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / sendProgressUpdate

Method sendProgressUpdate

Telegram/SourceFiles/storage/file_upload.cpp:272–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void 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
289Uploader::~Uploader() {
290 clear();

Callers

nothing calls this directly

Calls 9

replyToTopMethod · 0.80
requestItemRepaintMethod · 0.80
historyMethod · 0.45
sessionMethod · 0.45
updateMethod · 0.45
isMegagroupMethod · 0.45
isForumMethod · 0.45
topicRootIdMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected