2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Update API scheme on layer 148: Topic icons.

This commit is contained in:
John Preston
2022-10-05 11:42:44 +04:00
parent f3c664859d
commit ae3496d6a4
31 changed files with 525 additions and 204 deletions

View File

@@ -1080,18 +1080,18 @@ void History::applyServiceChanges(
forum->applyTopicAdded(
item->id,
qs(data.vtitle()),
data.vicon_color().v,
data.vicon_emoji_id().value_or(DocumentId()));
}
}, [&](const MTPDmessageActionTopicEditTitle &data) {
}, [&](const MTPDmessageActionTopicEdit &data) {
if (const auto forum = peer->forum()) {
if (const auto topic = forum->topicFor(item)) {
topic->applyTitle(qs(data.vtitle()));
}
}
}, [&](const MTPDmessageActionTopicEditIcon &data) {
if (const auto forum = peer->forum()) {
if (const auto topic = forum->topicFor(item)) {
topic->applyIconId(data.vemoji_document_id().v);
if (const auto &title = data.vtitle()) {
topic->applyTitle(qs(*title));
}
if (const auto icon = data.vicon_emoji_id()) {
topic->applyIconId(icon->v);
}
}
}
}, [](const auto &) {