[Improvement] Message ID

This commit is contained in:
Eric Kotato 2022-09-10 20:47:27 +03:00 committed by Eric Kotato
parent a0aab100a3
commit 8b8cdc2108
2 changed files with 5 additions and 0 deletions

View file

@ -100,6 +100,7 @@
"ktg_settings_chat_id_disable": "Hide",
"ktg_settings_chat_id_telegram": "Telegram API",
"ktg_settings_chat_id_bot": "Bot API",
"ktg_message_id": "Message ID: {id}",
"ktg_settings_monospace_large_bubbles": "Expand bubbles with monospace",
"ktg_bot_id_copied": "Bot ID copied to clipboard.",
"ktg_user_id_copied": "User ID copied to clipboard.",

View file

@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "history/view/history_view_element.h"
#include "kotato/kotato_lang.h"
#include "kotato/kotato_settings.h"
#include "history/view/history_view_service_message.h"
#include "history/view/history_view_message.h"
@ -283,6 +284,9 @@ QString DateTooltipText(not_null<Element*> view) {
if (item->isScheduled() && item->isSilent()) {
dateText += '\n' + QChar(0xD83D) + QChar(0xDD15);
}
if (const auto msgId = view->data()->fullId().msg) {
dateText += '\n' + ktr("ktg_message_id", {"id", QString::number(msgId.bare)});
}
return dateText;
}