2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Allow enabling forum, creating topics.

This commit is contained in:
John Preston
2022-09-20 22:12:30 +04:00
parent c88140e256
commit 388fe6adfb
21 changed files with 781 additions and 49 deletions

View File

@@ -19,6 +19,7 @@ class Session;
namespace Data {
class Session;
class Folder;
class ForumTopic;
class CloudImageView;
} // namespace Data
@@ -91,9 +92,10 @@ inline UnreadState operator-(const UnreadState &a, const UnreadState &b) {
class Entry {
public:
enum class Type {
enum class Type : uchar {
History,
Folder,
ForumTopic,
};
Entry(not_null<Data::Session*> owner, Type type);
Entry(const Entry &other) = delete;
@@ -105,6 +107,7 @@ public:
History *asHistory();
Data::Folder *asFolder();
Data::ForumTopic *asForumTopic();
PositionChange adjustByPosInChatList(
FilterId filterId,
@@ -230,7 +233,7 @@ private:
mutable int _chatListNameVersion = 0;
TimeId _timeId = 0;
bool _isTopPromoted = false;
const bool _isFolder = false;
const Type _type;
};