2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Handle documentLoadProgress instead of itemRepaintRequest.

This commit is contained in:
John Preston
2022-03-01 17:32:39 +03:00
parent 1f38ab1690
commit 0192edbe84
11 changed files with 109 additions and 59 deletions

View File

@@ -1281,21 +1281,19 @@ 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);
}
_documentLoadProgress.fire_copy(document);
}
void Session::documentLoadDone(not_null<DocumentData*> document) {
notifyDocumentLayoutChanged(document);
_documentLoadProgress.fire_copy(document);
}
void Session::documentLoadFail(
not_null<DocumentData*> document,
bool started) {
notifyDocumentLayoutChanged(document);
_documentLoadProgress.fire_copy(document);
}
void Session::photoLoadProgress(not_null<PhotoData*> photo) {