2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Use StorageFileLocation in mtpFileLoader.

This commit is contained in:
John Preston
2019-03-25 15:50:42 +04:00
parent 95023ca770
commit 8759d637ff
13 changed files with 167 additions and 230 deletions

View File

@@ -1246,7 +1246,7 @@ void MainWidget::exportTopBarHeightUpdated() {
}
void MainWidget::documentLoadProgress(FileLoader *loader) {
if (auto documentId = loader ? loader->objId() : 0) {
if (const auto documentId = loader ? loader->objId() : 0) {
documentLoadProgress(session().data().document(documentId));
}
}
@@ -1261,10 +1261,10 @@ void MainWidget::documentLoadProgress(DocumentData *document) {
}
void MainWidget::documentLoadFailed(FileLoader *loader, bool started) {
auto documentId = loader ? loader->objId() : 0;
const auto documentId = loader ? loader->objId() : 0;
if (!documentId) return;
auto document = session().data().document(documentId);
const auto document = session().data().document(documentId);
if (started) {
const auto origin = loader->fileOrigin();
const auto failedFileName = loader->fileName();