mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Make giveaway end message clickable.
This commit is contained in:
parent
e135f8954f
commit
8abc35ca86
3 changed files with 11 additions and 0 deletions
|
@ -788,6 +788,8 @@ HistoryServiceDependentData *HistoryItem::GetServiceDependentData() {
|
||||||
return info;
|
return info;
|
||||||
} else if (const auto same = Get<HistoryServiceSameBackground>()) {
|
} else if (const auto same = Get<HistoryServiceSameBackground>()) {
|
||||||
return same;
|
return same;
|
||||||
|
} else if (const auto results = Get<HistoryServiceGiveawayResults>()) {
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -3705,6 +3707,8 @@ void HistoryItem::createServiceFromMtp(const MTPDmessageService &message) {
|
||||||
} else {
|
} else {
|
||||||
RemoveComponents(HistoryServiceSameBackground::Bit());
|
RemoveComponents(HistoryServiceSameBackground::Bit());
|
||||||
}
|
}
|
||||||
|
} else if (type == mtpc_messageActionGiveawayResults) {
|
||||||
|
UpdateComponents(HistoryServiceGiveawayResults::Bit());
|
||||||
}
|
}
|
||||||
if (const auto replyTo = message.vreply_to()) {
|
if (const auto replyTo = message.vreply_to()) {
|
||||||
replyTo->match([&](const MTPDmessageReplyHeader &data) {
|
replyTo->match([&](const MTPDmessageReplyHeader &data) {
|
||||||
|
|
|
@ -599,6 +599,11 @@ struct HistoryServiceSameBackground
|
||||||
, public HistoryServiceDependentData {
|
, public HistoryServiceDependentData {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct HistoryServiceGiveawayResults
|
||||||
|
: public RuntimeComponent<HistoryServiceGiveawayResults, HistoryItem>
|
||||||
|
, public HistoryServiceDependentData {
|
||||||
|
};
|
||||||
|
|
||||||
enum class HistorySelfDestructType {
|
enum class HistorySelfDestructType {
|
||||||
Photo,
|
Photo,
|
||||||
Video,
|
Video,
|
||||||
|
|
|
@ -673,6 +673,8 @@ TextState Service::textState(QPoint point, StateRequest request) const {
|
||||||
}
|
}
|
||||||
} else if (const auto same = item->Get<HistoryServiceSameBackground>()) {
|
} else if (const auto same = item->Get<HistoryServiceSameBackground>()) {
|
||||||
result.link = same->lnk;
|
result.link = same->lnk;
|
||||||
|
} else if (const auto results = item->Get<HistoryServiceGiveawayResults>()) {
|
||||||
|
result.link = results->lnk;
|
||||||
} else if (media && data()->showSimilarChannels()) {
|
} else if (media && data()->showSimilarChannels()) {
|
||||||
result = media->textState(mediaPoint, request);
|
result = media->textState(mediaPoint, request);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue