2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow manually toggle stories expand state.

This commit is contained in:
John Preston
2023-07-11 12:21:50 +04:00
parent 85795aa376
commit 61b8aac7c4
5 changed files with 121 additions and 61 deletions

View File

@@ -167,6 +167,7 @@ private:
void setupDownloadBar();
void setupShortcuts();
void setupStories();
void storiesToggleExplicitExpand(bool expand);
[[nodiscard]] bool searchForPeersRequired(const QString &query) const;
[[nodiscard]] bool searchForTopicsRequired(const QString &query) const;
bool setSearchInChat(Key chat, PeerData *from = nullptr);
@@ -267,8 +268,13 @@ private:
bool _scrollToTopIsShown = false;
bool _forumSearchRequested = false;
int _overscrollTop = 0;
Fn<void()> _updateScrollGeometryCached;
std::unique_ptr<Stories::List> _stories;
Ui::Animations::Simple _storiesExplicitExpandAnimation;
rpl::variable<int> _storiesExplicitExpandValue = 0;
int _storiesExplicitExpandScrollTop = 0;
int _aboveScrollAdded = 0;
bool _storiesExplicitExpand = false;
Data::Folder *_openedFolder = nullptr;
Data::Forum *_openedForum = nullptr;