mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Replaced url click handler in view buttons with external sponsored link.
This commit is contained in:
parent
da7e8a8dc3
commit
d363a6ea84
1 changed files with 11 additions and 1 deletions
|
@ -106,7 +106,17 @@ inline auto WebPageToPhrase(not_null<WebPageData*> webpage) {
|
||||||
[[nodiscard]] ClickHandlerPtr SponsoredLink(
|
[[nodiscard]] ClickHandlerPtr SponsoredLink(
|
||||||
not_null<HistoryMessageSponsored*> sponsored) {
|
not_null<HistoryMessageSponsored*> sponsored) {
|
||||||
if (!sponsored->externalLink.isEmpty()) {
|
if (!sponsored->externalLink.isEmpty()) {
|
||||||
return std::make_shared<UrlClickHandler>(
|
class ClickHandler : public UrlClickHandler {
|
||||||
|
public:
|
||||||
|
using UrlClickHandler::UrlClickHandler;
|
||||||
|
|
||||||
|
QString copyToClipboardContextItemText() const override {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return std::make_shared<ClickHandler>(
|
||||||
sponsored->externalLink,
|
sponsored->externalLink,
|
||||||
false);
|
false);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue