2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +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

@@ -139,6 +139,14 @@ QImage ForumTopicIconFrame(
return background;
}
TextWithEntities ForumTopicIconWithTitle(
DocumentId iconId,
const QString &title) {
return iconId
? Data::SingleCustomEmoji(iconId).append(title)
: TextWithEntities{ title };
}
ForumTopic::ForumTopic(not_null<Forum*> forum, MsgId rootId)
: Thread(&forum->history()->owner(), Type::ForumTopic)
, _forum(forum)
@@ -570,6 +578,10 @@ QString ForumTopic::title() const {
return _title;
}
TextWithEntities ForumTopic::titleWithIcon() const {
return ForumTopicIconWithTitle(_iconId, _title);
}
void ForumTopic::applyTitle(const QString &title) {
if (_title == title) {
return;