mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
fix: avoid opening scheduled section
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user