mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Short poll extended media.
This commit is contained in:
@@ -1611,7 +1611,7 @@ std::unique_ptr<HistoryView::Media> MediaInvoice::createView(
|
||||
message,
|
||||
realParent,
|
||||
replacing);
|
||||
} else if (!_invoice.extendedPreview.dimensions.isEmpty()) {
|
||||
} else if (_invoice.extendedPreview) {
|
||||
return std::make_unique<HistoryView::ExtendedPreview>(
|
||||
message,
|
||||
&_invoice);
|
||||
|
@@ -63,6 +63,13 @@ struct ExtendedPreview {
|
||||
QByteArray inlineThumbnailBytes;
|
||||
QSize dimensions;
|
||||
TimeId videoDuration = -1;
|
||||
|
||||
[[nodiscard]] bool empty() const {
|
||||
return dimensions.isEmpty();
|
||||
}
|
||||
explicit operator bool() const {
|
||||
return !empty();
|
||||
}
|
||||
};
|
||||
|
||||
class Media;
|
||||
|
Reference in New Issue
Block a user