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

Show correct chat preview for paid media.

This commit is contained in:
John Preston
2024-06-19 15:01:28 +04:00
parent 5f8da27c86
commit 950a946a16
9 changed files with 184 additions and 54 deletions

View File

@@ -59,7 +59,7 @@ void PhotoData::setFields(TimeId date, bool hasAttachedStickers) {
void PhotoData::setExtendedMediaPreview(
QSize dimensions,
const QByteArray &inlineThumbnailBytes,
TimeId videoDuration) {
std::optional<TimeId> videoDuration) {
_extendedMediaPreview = true;
updateImages(
inlineThumbnailBytes,
@@ -69,7 +69,7 @@ void PhotoData::setExtendedMediaPreview(
{},
{},
{});
_dateOrExtendedVideoDuration = videoDuration + 1;
_dateOrExtendedVideoDuration = videoDuration ? (*videoDuration + 1) : 0;
}
bool PhotoData::extendedMediaPreview() const {