2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Display topic name in chats list.

This commit is contained in:
John Preston
2022-11-02 16:39:13 +04:00
parent fdf4129e5e
commit 34a2c5c8ce
28 changed files with 223 additions and 172 deletions

View File

@@ -21,9 +21,7 @@ using namespace TextUtilities;
[[nodiscard]] QString CustomEmojiEntityData(
const MTPDmessageEntityCustomEmoji &data) {
return Data::SerializeCustomEmojiId({
.id = data.vdocument_id().v,
});
return Data::SerializeCustomEmojiId(data.vdocument_id().v);
}
[[nodiscard]] std::optional<MTPMessageEntity> CustomEmojiEntity(
@@ -31,13 +29,13 @@ using namespace TextUtilities;
MTPint length,
const QString &data) {
const auto parsed = Data::ParseCustomEmojiData(data);
if (!parsed.id) {
if (!parsed) {
return {};
}
return MTP_messageEntityCustomEmoji(
offset,
length,
MTP_long(parsed.id));
MTP_long(parsed));
}
[[nodiscard]] std::optional<MTPMessageEntity> MentionNameEntity(