2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Show stories in chats list userpics.

This commit is contained in:
John Preston
2023-07-04 20:13:56 +04:00
parent 9a29807276
commit d7d8847c1d
11 changed files with 259 additions and 33 deletions

View File

@@ -63,6 +63,8 @@ enum class UserDataFlag {
VoiceMessagesForbidden = (1 << 16),
PersonalPhoto = (1 << 17),
StoriesHidden = (1 << 18),
HasActiveStories = (1 << 19),
HasUnreadStories = (1 << 20),
};
inline constexpr bool is_flag_type(UserDataFlag) { return true; };
using UserDataFlags = base::flags<UserDataFlag>;
@@ -174,6 +176,16 @@ public:
[[nodiscard]] QString privateForwardName() const;
void setPrivateForwardName(const QString &name);
enum class StoriesState {
Unknown,
None,
HasRead,
HasUnread,
};
[[nodiscard]] bool hasActiveStories() const;
[[nodiscard]] bool hasUnreadStories() const;
void setStoriesState(StoriesState state);
private:
auto unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & override;