2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-06 01:16:12 +00:00

Allow editing topic title and icon.

This commit is contained in:
John Preston
2022-09-27 16:05:47 +04:00
parent c90f879c96
commit 3b3792ef75
42 changed files with 603 additions and 190 deletions

View File

@@ -55,8 +55,17 @@ ForumTopic *Key::topic() const {
return _value ? _value->asTopic() : nullptr;
}
History *Key::parentHistory() const {
if (const auto result = history()) {
return result;
} else if (const auto child = topic()) {
return child->forum();
}
return nullptr;
}
PeerData *Key::peer() const {
if (const auto history = this->history()) {
if (const auto history = parentHistory()) {
return history->peer;
}
return nullptr;