mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Replaced url click handler in view buttons with external sponsored link.
This commit is contained in:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user