2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use rpl for file download progress notifications.

This commit is contained in:
John Preston
2020-04-10 15:17:10 +04:00
parent bf616036b3
commit 97bab388ea
14 changed files with 125 additions and 142 deletions

View File

@@ -1114,6 +1114,25 @@ void Session::requestPollViewRepaint(not_null<const PollData*> poll) {
}
}
void Session::documentLoadProgress(not_null<DocumentData*> document) {
requestDocumentViewRepaint(document);
session().documentUpdated.notify(document, true);
if (document->isAudioFile()) {
::Media::Player::instance()->documentLoadProgress(document);
}
}
void Session::documentLoadDone(not_null<DocumentData*> document) {
notifyDocumentLayoutChanged(document);
}
void Session::documentLoadFail(
not_null<DocumentData*> document,
bool started) {
notifyDocumentLayoutChanged(document);
}
void Session::markMediaRead(not_null<const DocumentData*> document) {
const auto i = _documentItems.find(document);
if (i != end(_documentItems)) {