2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Display colored reply preview.

Fixes #4768.
This commit is contained in:
John Preston
2018-05-31 14:13:11 +03:00
parent 0cbad9098e
commit b3059248d4
6 changed files with 55 additions and 49 deletions

View File

@@ -464,8 +464,11 @@ QString HistoryService::inDialogsText(DrawInDialog way) const {
}
QString HistoryService::inReplyText() const {
QString result = HistoryService::notificationText();
return result.trimmed().startsWith(author()->name) ? result.trimmed().mid(author()->name.size()).trimmed() : result;
const auto result = HistoryService::notificationText();
const auto text = result.trimmed().startsWith(author()->name)
? result.trimmed().mid(author()->name.size()).trimmed()
: result;
return textcmdLink(1, text);
}
std::unique_ptr<HistoryView::Element> HistoryService::createView(