2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Support sharing games by link to topics.

This commit is contained in:
John Preston
2022-11-01 13:00:17 +04:00
parent 83ec449890
commit 7384cd3463
16 changed files with 152 additions and 122 deletions

View File

@@ -97,7 +97,15 @@ Main::Session &Entry::session() const {
}
History *Entry::asHistory() {
return (_flags & Flag::IsHistory) ? static_cast<History*>(this) : nullptr;
return (_flags & Flag::IsHistory)
? static_cast<History*>(this)
: nullptr;
}
Data::Forum *Entry::asForum() {
return (_flags & Flag::IsHistory)
? static_cast<History*>(this)->peer->forum()
: nullptr;
}
Data::Folder *Entry::asFolder() {
@@ -122,6 +130,10 @@ const History *Entry::asHistory() const {
return const_cast<Entry*>(this)->asHistory();
}
const Data::Forum *Entry::asForum() const {
return const_cast<Entry*>(this)->asForum();
}
const Data::Folder *Entry::asFolder() const {
return const_cast<Entry*>(this)->asFolder();
}