mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Start topic profile cover design.
This commit is contained in:
@@ -149,6 +149,8 @@ struct TopicUpdate {
|
||||
UnreadMentions = (1U << 2),
|
||||
UnreadReactions = (1U << 3),
|
||||
Notifications = (1U << 4),
|
||||
Title = (1U << 5),
|
||||
Icon = (1U << 6),
|
||||
|
||||
LastUsedBit = (1U << 4),
|
||||
};
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user