2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Start topic profile cover design.

This commit is contained in:
John Preston
2022-10-14 20:53:06 +04:00
parent d4255bbfe4
commit 791addd0ee
10 changed files with 232 additions and 125 deletions

View File

@@ -443,6 +443,7 @@ void ForumTopic::applyTitle(const QString &title) {
_defaultIcon = QImage();
indexTitleParts();
updateChatListEntry();
session().changes().topicUpdated(this, UpdateFlag::Title);
}
DocumentId ForumTopic::iconId() const {
@@ -450,19 +451,21 @@ DocumentId ForumTopic::iconId() const {
}
void ForumTopic::applyIconId(DocumentId iconId) {
if (_iconId != iconId) {
_iconId = iconId;
_icon = iconId
? owner().customEmojiManager().create(
_iconId,
[=] { updateChatListEntry(); },
Data::CustomEmojiManager::SizeTag::Normal)
: nullptr;
if (iconId) {
_defaultIcon = QImage();
}
if (_iconId == iconId) {
return;
}
_iconId = iconId;
_icon = iconId
? owner().customEmojiManager().create(
_iconId,
[=] { updateChatListEntry(); },
Data::CustomEmojiManager::SizeTag::Normal)
: nullptr;
if (iconId) {
_defaultIcon = QImage();
}
updateChatListEntry();
session().changes().topicUpdated(this, UpdateFlag::Icon);
}
int32 ForumTopic::colorId() const {