From 7491337bfdb44b58e9e77befa9ef649a4cea76ef Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 30 Dec 2024 12:27:06 +0400 Subject: [PATCH] Show forward original date for edited items. --- .../view/history_view_context_menu.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index ae83f6c5fb..a23f102a78 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -1461,16 +1461,7 @@ void AddWhenEditedForwardedActionHelper( not_null menu, not_null item, bool insertSeparator) { - if (const auto edited = item->Get()) { - if (!item->hideEditedBadge()) { - if (insertSeparator && !menu->empty()) { - menu->addSeparator(&st::expandedMenuSeparator); - } - menu->addAction(Ui::WhenReadContextAction( - menu.get(), - Api::WhenEdited(item->from(), edited->date))); - } - } else if (const auto forwarded = item->Get()) { + if (const auto forwarded = item->Get()) { if (!forwarded->story && forwarded->psaType.isEmpty()) { if (insertSeparator && !menu->empty()) { menu->addSeparator(&st::expandedMenuSeparator); @@ -1479,6 +1470,15 @@ void AddWhenEditedForwardedActionHelper( menu.get(), Api::WhenOriginal(item->from(), forwarded->originalDate))); } + } else if (const auto edited = item->Get()) { + if (!item->hideEditedBadge()) { + if (insertSeparator && !menu->empty()) { + menu->addSeparator(&st::expandedMenuSeparator); + } + menu->addAction(Ui::WhenReadContextAction( + menu.get(), + Api::WhenEdited(item->from(), edited->date))); + } } }