2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Apply web page media updates.

This commit is contained in:
John Preston
2017-12-31 12:39:21 +03:00
parent 9551cfaf9b
commit 6796ac688a
7 changed files with 261 additions and 68 deletions

View File

@@ -50,9 +50,9 @@ struct WebPageData {
const TextWithEntities &description,
DocumentData *document,
PhotoData *photo,
int32 duration,
int duration,
const QString &author,
int32 pendingTill)
int pendingTill)
: id(id)
, type(type)
, url(url)
@@ -72,6 +72,19 @@ struct WebPageData {
if (photo) photo->forget();
}
bool applyChanges(
const QString &newType,
const QString &newUrl,
const QString &newDisplayUrl,
const QString &newSiteName,
const QString &newTitle,
const TextWithEntities &newDescription,
PhotoData *newPhoto,
DocumentData *newDocument,
int newDuration,
const QString &newAuthor,
int newPendingTill);
WebPageId id = 0;
WebPageType type = WebPageArticle;
QString url;
@@ -79,10 +92,11 @@ struct WebPageData {
QString siteName;
QString title;
TextWithEntities description;
int32 duration = 0;
int duration = 0;
QString author;
PhotoData *photo = nullptr;
DocumentData *document = nullptr;
int32 pendingTill = 0;
int pendingTill = 0;
int version = 0;
};