2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Added Up arrow shortcut to edit scheduled messages.

This commit is contained in:
23rd
2020-06-04 13:29:16 +03:00
parent e862215efb
commit 11018d76f1
9 changed files with 88 additions and 27 deletions

View File

@@ -2895,20 +2895,7 @@ HistoryItem *History::lastSentMessage() const {
for (const auto &block : ranges::view::reverse(blocks)) {
for (const auto &message : ranges::view::reverse(block->messages)) {
const auto item = message->data();
// Skip if message is editing media.
if (item->isEditingMedia()) {
continue;
}
// Skip if message is video message or sticker.
if (const auto media = item->media()) {
// Skip only if media is not webpage.
if (!media->webpage() && !media->allowsEditCaption()) {
continue;
}
}
if (IsServerMsgId(item->id)
&& !item->serviceMsg()
&& (item->out() || peer->isSelf())) {
if (item->canBeEditedFromHistory()) {
return item;
}
}