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

Support chat preview on touchscreens.

This commit is contained in:
John Preston
2024-05-30 22:33:24 +04:00
parent 40fbd415ef
commit 4df5372dab
5 changed files with 67 additions and 1 deletions

View File

@@ -174,6 +174,11 @@ public:
void parentGeometryChanged();
void processTouchEvent(not_null<QTouchEvent*> e);
[[nodiscard]] rpl::producer<> touchCancelRequests() const {
return _touchCancelRequests.events();
}
protected:
void visibleTopBottomUpdated(
int visibleTop,
@@ -520,6 +525,9 @@ private:
base::Timer _chatPreviewTimer;
Key _chatPreviewWillBeFor;
Key _chatPreviewKey;
std::optional<QPoint> _chatPreviewTouchLocal;
std::optional<QPoint> _chatPreviewTouchGlobal;
rpl::event_stream<> _touchCancelRequests;
rpl::variable<ChildListShown> _childListShown;
float64 _narrowRatio = 0.;