mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-29 08:47:52 +00:00
Support forwarding to monoforums.
This commit is contained in:
@@ -84,9 +84,9 @@ Entry::Entry(not_null<Data::Session*> owner, Type type)
|
||||
, _flags((type == Type::History)
|
||||
? (Flag::IsThread | Flag::IsHistory)
|
||||
: (type == Type::ForumTopic)
|
||||
? Flag::IsThread
|
||||
? (Flag::IsThread | Flag::IsForumTopic)
|
||||
: (type == Type::SavedSublist)
|
||||
? Flag::IsSavedSublist
|
||||
? (Flag::IsThread | Flag::IsSavedSublist)
|
||||
: Flag(0)) {
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ Data::Forum *Entry::asForum() {
|
||||
}
|
||||
|
||||
Data::Folder *Entry::asFolder() {
|
||||
return (_flags & (Flag::IsThread | Flag::IsSavedSublist))
|
||||
return (_flags & Flag::IsThread)
|
||||
? nullptr
|
||||
: static_cast<Data::Folder*>(this);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ Data::Thread *Entry::asThread() {
|
||||
}
|
||||
|
||||
Data::ForumTopic *Entry::asTopic() {
|
||||
return ((_flags & Flag::IsThread) && !(_flags & Flag::IsHistory))
|
||||
return (_flags & Flag::IsForumTopic)
|
||||
? static_cast<Data::ForumTopic*>(this)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user