mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-29 13:39:06 +00:00
Show forward original date for edited items.
This commit is contained in:
parent
d6b833fbb2
commit
7491337bfd
@ -1461,16 +1461,7 @@ void AddWhenEditedForwardedActionHelper(
|
|||||||
not_null<Ui::PopupMenu*> menu,
|
not_null<Ui::PopupMenu*> menu,
|
||||||
not_null<HistoryItem*> item,
|
not_null<HistoryItem*> item,
|
||||||
bool insertSeparator) {
|
bool insertSeparator) {
|
||||||
if (const auto edited = item->Get<HistoryMessageEdited>()) {
|
if (const auto forwarded = item->Get<HistoryMessageForwarded>()) {
|
||||||
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<HistoryMessageForwarded>()) {
|
|
||||||
if (!forwarded->story && forwarded->psaType.isEmpty()) {
|
if (!forwarded->story && forwarded->psaType.isEmpty()) {
|
||||||
if (insertSeparator && !menu->empty()) {
|
if (insertSeparator && !menu->empty()) {
|
||||||
menu->addSeparator(&st::expandedMenuSeparator);
|
menu->addSeparator(&st::expandedMenuSeparator);
|
||||||
@ -1479,6 +1470,15 @@ void AddWhenEditedForwardedActionHelper(
|
|||||||
menu.get(),
|
menu.get(),
|
||||||
Api::WhenOriginal(item->from(), forwarded->originalDate)));
|
Api::WhenOriginal(item->from(), forwarded->originalDate)));
|
||||||
}
|
}
|
||||||
|
} else if (const auto edited = item->Get<HistoryMessageEdited>()) {
|
||||||
|
if (!item->hideEditedBadge()) {
|
||||||
|
if (insertSeparator && !menu->empty()) {
|
||||||
|
menu->addSeparator(&st::expandedMenuSeparator);
|
||||||
|
}
|
||||||
|
menu->addAction(Ui::WhenReadContextAction(
|
||||||
|
menu.get(),
|
||||||
|
Api::WhenEdited(item->from(), edited->date)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user