mirror of https://github.com/procxx/kepka.git
Fixed missing reply cancel after sending scheduled message.
This commit is contained in:
parent
7cbc5ef902
commit
ef5055f4f3
|
@ -647,16 +647,17 @@ HistoryWidget::HistoryWidget(
|
||||||
) | rpl::filter([=](const Api::SendAction &action) {
|
) | rpl::filter([=](const Api::SendAction &action) {
|
||||||
return (action.history == _history);
|
return (action.history == _history);
|
||||||
}) | rpl::start_with_next([=](const Api::SendAction &action) {
|
}) | rpl::start_with_next([=](const Api::SendAction &action) {
|
||||||
|
const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId(
|
||||||
|
action.history->channelId(),
|
||||||
|
action.replyTo));
|
||||||
if (action.options.scheduled) {
|
if (action.options.scheduled) {
|
||||||
|
cancelReply(lastKeyboardUsed);
|
||||||
crl::on_main(this, [=, history = action.history]{
|
crl::on_main(this, [=, history = action.history]{
|
||||||
controller->showSection(
|
controller->showSection(
|
||||||
HistoryView::ScheduledMemento(history));
|
HistoryView::ScheduledMemento(history));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
fastShowAtEnd(action.history);
|
fastShowAtEnd(action.history);
|
||||||
const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId(
|
|
||||||
action.history->channelId(),
|
|
||||||
action.replyTo));
|
|
||||||
if (cancelReply(lastKeyboardUsed) && !action.clearDraft) {
|
if (cancelReply(lastKeyboardUsed) && !action.clearDraft) {
|
||||||
onCloudDraftSave();
|
onCloudDraftSave();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue