Full upgradable variants preview.
This commit is contained in:
@@ -431,7 +431,7 @@ void DocumentMedia::GenerateGoodThumbnail(
|
||||
document->setGoodThumbnailChecked(false);
|
||||
return;
|
||||
}
|
||||
const auto guard = base::make_weak(&document->owner().session());
|
||||
const auto guard = base::make_weak(&document->session());
|
||||
crl::async([=, location = std::move(location)] {
|
||||
const auto filepath = (location && location->accessEnable())
|
||||
? location->name()
|
||||
|
||||
@@ -20,14 +20,26 @@ namespace Data {
|
||||
struct UniqueGiftAttribute {
|
||||
QString name;
|
||||
int rarityPermille = 0;
|
||||
|
||||
friend inline bool operator==(
|
||||
const UniqueGiftAttribute &,
|
||||
const UniqueGiftAttribute &) = default;
|
||||
};
|
||||
|
||||
struct UniqueGiftModel : UniqueGiftAttribute {
|
||||
not_null<DocumentData*> document;
|
||||
|
||||
friend inline bool operator==(
|
||||
const UniqueGiftModel &,
|
||||
const UniqueGiftModel &) = default;
|
||||
};
|
||||
|
||||
struct UniqueGiftPattern : UniqueGiftAttribute {
|
||||
not_null<DocumentData*> document;
|
||||
|
||||
friend inline bool operator==(
|
||||
const UniqueGiftPattern &,
|
||||
const UniqueGiftPattern &) = default;
|
||||
};
|
||||
|
||||
struct UniqueGiftBackdrop : UniqueGiftAttribute {
|
||||
@@ -36,6 +48,10 @@ struct UniqueGiftBackdrop : UniqueGiftAttribute {
|
||||
QColor patternColor;
|
||||
QColor textColor;
|
||||
int id = 0;
|
||||
|
||||
friend inline bool operator==(
|
||||
const UniqueGiftBackdrop &,
|
||||
const UniqueGiftBackdrop &) = default;
|
||||
};
|
||||
|
||||
struct UniqueGiftAttributes {
|
||||
|
||||
@@ -727,7 +727,7 @@ void Story::applyFields(
|
||||
auto caption = TextWithEntities{
|
||||
data.vcaption().value_or_empty(),
|
||||
Api::EntitiesFromMTP(
|
||||
&owner().session(),
|
||||
&session(),
|
||||
data.ventities().value_or_empty()),
|
||||
};
|
||||
if (const auto user = _peer->asUser()) {
|
||||
|
||||
Reference in New Issue
Block a user