2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use Data::DocumentMedia to store good thumbnails.

This commit is contained in:
John Preston
2020-03-27 15:40:50 +04:00
parent 61647275e8
commit 7db53599e8
29 changed files with 545 additions and 168 deletions

View File

@@ -19,6 +19,7 @@ struct RoundCheckbox;
namespace Data {
class Media;
class DocumentMedia;
} // namespace Data
namespace Overview {
@@ -220,11 +221,12 @@ private:
};
class Video : public RadialProgressItem {
class Video final : public RadialProgressItem {
public:
Video(
not_null<HistoryItem*> parent,
not_null<DocumentData*> video);
~Video();
void initDimensions() override;
int32 resizeGetHeight(int32 width) override;
@@ -240,15 +242,17 @@ protected:
bool iconAnimated() const override;
private:
void ensureDataMediaCreated() const;
void updateStatusText();
not_null<DocumentData*> _data;
mutable std::shared_ptr<Data::DocumentMedia> _dataMedia;
StatusText _status;
QString _duration;
QPixmap _pix;
bool _pixBlurred = true;
void updateStatusText();
};
class Voice : public RadialProgressItem {