diff --git a/Telegram/SourceFiles/ayu/ui/context_menu/context_menu.cpp b/Telegram/SourceFiles/ayu/ui/context_menu/context_menu.cpp index 700deb0a3d..7216520af4 100644 --- a/Telegram/SourceFiles/ayu/ui/context_menu/context_menu.cpp +++ b/Telegram/SourceFiles/ayu/ui/context_menu/context_menu.cpp @@ -156,7 +156,7 @@ void AddOpenChannelAction(PeerData *peerData, return; } - const auto chat = peerData->asMegagroup()->linkedChat(); + const auto chat = peerData->asMegagroup()->discussionLink(); if (!chat) { return; } diff --git a/Telegram/SourceFiles/data/components/promo_suggestions.cpp b/Telegram/SourceFiles/data/components/promo_suggestions.cpp index fd6613815c..43cafca12b 100644 --- a/Telegram/SourceFiles/data/components/promo_suggestions.cpp +++ b/Telegram/SourceFiles/data/components/promo_suggestions.cpp @@ -19,6 +19,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history.h" #include "main/main_session.h" +// AyuGram includes +#include "ayu/ayu_settings.h" + + namespace Data { namespace { @@ -111,6 +115,12 @@ void PromoSuggestions::refreshTopPromotion() { |= _dismissedSuggestions.emplace(qs(suggestion)).second; } + const auto& settings = AyuSettings::getInstance(); + if (settings.disableAds) { + setTopPromoted(nullptr, QString(), QString()); + return; + } + if (const auto peer = data.vpeer()) { const auto peerId = peerFromMTP(*peer); const auto history = _session->data().history(peerId); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 3d35173fb6..46ed9bc479 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -4776,7 +4776,7 @@ void HistoryWidget::toggleMuteUnmute() { void HistoryWidget::goToDiscussionGroup() { const auto channel = _peer ? _peer->asChannel() : nullptr; - const auto chat = channel ? channel->linkedChat() : nullptr; + const auto chat = channel ? channel->discussionLink() : nullptr; if (!chat) { return; } diff --git a/Telegram/codegen b/Telegram/codegen index 09f3535398..5a0421e462 160000 --- a/Telegram/codegen +++ b/Telegram/codegen @@ -1 +1 @@ -Subproject commit 09f353539861c5fe236e56c0bf97c01c469e4cbc +Subproject commit 5a0421e4623f6e2da58620f3818ae19df9309b43 diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 30a34e567f..9523ff72ae 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 30a34e567feae0af751d7f713d33a60497c673c2 +Subproject commit 9523ff72aea22f760c9b99e98b489ced316e0cb8