diff --git a/Telegram/SourceFiles/ayu/ayu_settings.h b/Telegram/SourceFiles/ayu/ayu_settings.h index 30a9e85ee..86ab535b2 100644 --- a/Telegram/SourceFiles/ayu/ayu_settings.h +++ b/Telegram/SourceFiles/ayu/ayu_settings.h @@ -73,6 +73,7 @@ public: // 2 - show with SHIFT or CTRL pressed showReactionsPanelInContextMenu = 1; showViewsPanelInContextMenu = 1; + showHideMessageInContextMenu = 0; showUserMessagesInContextMenu = 2; showMessageDetailsInContextMenu = 2; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index ac6548980..95eba281a 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -1156,13 +1156,15 @@ void HistoryItem::setCommentsItemId(FullMsgId id) { void HistoryItem::setServiceText(PreparedServiceText &&prepared) { auto text = std::move(prepared.text); - if (!text.text.isEmpty()) { - const auto settings = &AyuSettings::getInstance(); - text = text.append(QString(" (%1)").arg(QLocale().toString( - base::unixtime::parse(_date), - settings->showMessageSeconds ? QLocale::system().timeFormat(QLocale::LongFormat).remove(" t") - : QLocale::system().timeFormat(QLocale::ShortFormat) - ))); + + const auto settings = &AyuSettings::getInstance(); + const auto timeString = QString(" (%1)").arg(QLocale().toString( + base::unixtime::parse(_date), + settings->showMessageSeconds ? QLocale::system().timeFormat(QLocale::LongFormat).remove(" t") + : QLocale::system().timeFormat(QLocale::ShortFormat) + )); + if (!text.text.isEmpty() && !text.text.contains(timeString)) { + text = text.append(timeString); } AddComponents(HistoryServiceData::Bit()); @@ -2706,7 +2708,7 @@ void HistoryItem::setAyuHint(const QString &hint) { else { const auto data = Get(); auto prepared = PreparedServiceText{ - .text = _text.append(" ").append(hint), + .text = _text.append(QString(" (%1)").arg(hint)), .links = data->textLinks }; setServiceText(std::move(prepared));