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>
// 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<HistoryView::ScheduledMemento>(t));
});
const auto &ghost = AyuSettings::ghost(&session());
if (!ghost.isUseScheduledMessages()) {
crl::on_main(this, [=, t = _topic] {
controller->showSection(
std::make_shared<HistoryView::ScheduledMemento>(t));
});
}
}
}, lifetime());
}