2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Show video thumbnail in SendFileBox.

Read media information (image / song / video) in SendFileBox in the
same way it is read in FileLoadTask::process() and reuse it in
FileLoadTask if it was loaded already for the box.
This commit is contained in:
John Preston
2017-03-10 17:14:10 +03:00
parent 9ed8cbe2d1
commit a1b53c660e
16 changed files with 391 additions and 201 deletions

View File

@@ -1258,6 +1258,14 @@ public:
return ::mediaKey(locationType(), _dc, id, _version);
}
static QString composeNameString(const QString &filename, const QString &songTitle, const QString &songPerformer);
QString composeNameString() const {
if (auto songData = song()) {
return composeNameString(name, songData->title, songData->performer);
}
return composeNameString(name, QString(), QString());
}
private:
DocumentData(DocumentId id, int32 dc, uint64 accessHash, int32 version, const QString &url, const QVector<MTPDocumentAttribute> &attributes);