fix: avoid opening scheduled section

This commit is contained in:
AlexeyZavar
2026-06-17 13:47:24 +03:00
parent d83cb2cd72
commit 34bfeb7058
@@ -95,6 +95,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QMimeData> #include <QtCore/QMimeData>
// AyuGram includes // AyuGram includes
#include "ayu/ayu_settings.h"
#include "ayu/features/message_shot/message_shot.h" #include "ayu/features/message_shot/message_shot.h"
#include "base/unixtime.h" #include "base/unixtime.h"
@@ -459,10 +460,13 @@ ChatWidget::ChatWidget(
}) | rpl::on_next([=](const Api::SendAction &action) { }) | rpl::on_next([=](const Api::SendAction &action) {
if (action.options.scheduled) { if (action.options.scheduled) {
_composeControls->cancelReplyMessage(); _composeControls->cancelReplyMessage();
crl::on_main(this, [=, t = _topic] { const auto &ghost = AyuSettings::ghost(&session());
controller->showSection( if (!ghost.isUseScheduledMessages()) {
std::make_shared<HistoryView::ScheduledMemento>(t)); crl::on_main(this, [=, t = _topic] {
}); controller->showSection(
std::make_shared<HistoryView::ScheduledMemento>(t));
});
}
} }
}, lifetime()); }, lifetime());
} }