From 34bfeb705858920156df2f1e57bd66cb5811b45c Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Wed, 17 Jun 2026 13:47:24 +0300 Subject: [PATCH] fix: avoid opening scheduled section --- .../history/view/history_view_chat_section.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_chat_section.cpp b/Telegram/SourceFiles/history/view/history_view_chat_section.cpp index 2c52f4b737..0bff84c8d2 100644 --- a/Telegram/SourceFiles/history/view/history_view_chat_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_chat_section.cpp @@ -95,6 +95,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include // AyuGram includes +#include "ayu/ayu_settings.h" #include "ayu/features/message_shot/message_shot.h" #include "base/unixtime.h" @@ -459,10 +460,13 @@ ChatWidget::ChatWidget( }) | rpl::on_next([=](const Api::SendAction &action) { if (action.options.scheduled) { _composeControls->cancelReplyMessage(); - crl::on_main(this, [=, t = _topic] { - controller->showSection( - std::make_shared(t)); - }); + const auto &ghost = AyuSettings::ghost(&session()); + if (!ghost.isUseScheduledMessages()) { + crl::on_main(this, [=, t = _topic] { + controller->showSection( + std::make_shared(t)); + }); + } } }, lifetime()); }