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

Empty preview widget on long userpic press.

This commit is contained in:
John Preston
2024-05-02 19:39:36 +04:00
parent ef2aa05197
commit 4427ae4306
6 changed files with 234 additions and 7 deletions

View File

@@ -7,14 +7,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "base/flags.h"
#include "base/object_ptr.h"
#include "base/timer.h"
#include "dialogs/dialogs_key.h"
#include "data/data_messages.h"
#include "ui/dragging_scroll_manager.h"
#include "ui/effects/animations.h"
#include "ui/rp_widget.h"
#include "ui/userpic_view.h"
#include "base/flags.h"
#include "base/object_ptr.h"
namespace style {
struct DialogRow;
@@ -121,6 +122,10 @@ public:
void refreshEmptyLabel();
void resizeEmptyLabel();
[[nodiscard]] bool isUserpicPress() const;
[[nodiscard]] bool pressShowsPreview() const;
void cancelChatPreview();
void showChatPreview();
bool chooseRow(
Qt::KeyboardModifiers modifiers = {},
MsgId pressedTopicRootId = {});
@@ -514,6 +519,10 @@ private:
rpl::event_stream<QString> _completeHashtagRequests;
rpl::event_stream<> _refreshHashtagsRequests;
base::Timer _chatPreviewTimer;
Key _chatPreviewWillBeFor;
Key _chatPreviewKey;
rpl::variable<ChildListShown> _childListShown;
float64 _narrowRatio = 0.;
bool _geometryInited = false;