2014-05-30 12:53:19 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-05-30 12:53:19 +04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-01 15:01:42 +03:00
|
|
|
#include "dialogs/dialogs_widget.h"
|
2018-01-04 22:54:35 +03:00
|
|
|
#include "dialogs/dialogs_key.h"
|
2018-02-16 18:46:24 +03:00
|
|
|
#include "data/data_messages.h"
|
2019-04-01 21:44:54 +04:00
|
|
|
#include "ui/effects/animations.h"
|
2019-04-16 13:29:21 +04:00
|
|
|
#include "ui/rp_widget.h"
|
2017-08-31 19:28:58 +03:00
|
|
|
#include "base/flags.h"
|
2016-05-19 15:03:51 +03:00
|
|
|
|
2016-04-09 22:45:55 +04:00
|
|
|
namespace Dialogs {
|
|
|
|
class Row;
|
|
|
|
class FakeRow;
|
|
|
|
class IndexedList;
|
|
|
|
} // namespace Dialogs
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2016-06-20 18:40:36 +03:00
|
|
|
namespace Ui {
|
2016-10-28 00:19:38 +03:00
|
|
|
class IconButton;
|
2016-10-26 19:43:13 +03:00
|
|
|
class PopupMenu;
|
2016-11-11 16:46:04 +03:00
|
|
|
class LinkButton;
|
2016-06-20 18:40:36 +03:00
|
|
|
} // namespace Ui
|
|
|
|
|
2017-03-27 15:24:38 +03:00
|
|
|
namespace Window {
|
|
|
|
class Controller;
|
|
|
|
} // namespace Window
|
|
|
|
|
2019-04-16 13:29:21 +04:00
|
|
|
class DialogsInner
|
|
|
|
: public Ui::RpWidget
|
|
|
|
, public RPCSender
|
|
|
|
, private base::Subscriber {
|
2014-05-30 12:53:19 +04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-04-16 18:05:56 +04:00
|
|
|
DialogsInner(QWidget *parent, not_null<Window::Controller*> controller);
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2018-01-22 13:58:11 +03:00
|
|
|
bool searchReceived(
|
|
|
|
const QVector<MTPMessage> &result,
|
|
|
|
DialogsSearchRequestType type,
|
|
|
|
int fullCount);
|
|
|
|
void peerSearchReceived(
|
|
|
|
const QString &query,
|
|
|
|
const QVector<MTPPeer> &my,
|
|
|
|
const QVector<MTPPeer> &result);
|
2014-05-30 12:53:19 +04:00
|
|
|
|
|
|
|
void activate();
|
|
|
|
|
2019-04-16 22:06:15 +04:00
|
|
|
bool cancelFolder();
|
2014-05-30 12:53:19 +04:00
|
|
|
void selectSkip(int32 direction);
|
|
|
|
void selectSkipPage(int32 pixels, int32 direction);
|
|
|
|
|
2019-04-16 18:05:56 +04:00
|
|
|
void refreshDialog(Dialogs::Key key);
|
2018-01-05 18:57:18 +03:00
|
|
|
void removeDialog(Dialogs::Key key);
|
2018-01-22 20:39:20 +03:00
|
|
|
void repaintDialogRow(Dialogs::Mode list, not_null<Dialogs::Row*> row);
|
2018-12-30 13:16:50 +04:00
|
|
|
void repaintDialogRow(Dialogs::RowDescriptor row);
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2016-12-04 22:40:41 +03:00
|
|
|
void dragLeft();
|
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
void clearFilter();
|
|
|
|
void refresh(bool toTop = false);
|
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
bool chooseRow();
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2018-11-16 17:36:42 +04:00
|
|
|
void scrollToEntry(const Dialogs::RowDescriptor &entry);
|
2014-08-22 11:41:39 +04:00
|
|
|
|
2019-04-18 12:28:43 +04:00
|
|
|
Data::Folder *shownFolder() const;
|
2015-11-18 16:11:56 +03:00
|
|
|
int32 lastSearchDate() const;
|
|
|
|
PeerData *lastSearchPeer() const;
|
2014-08-22 11:41:39 +04:00
|
|
|
MsgId lastSearchId() const;
|
2015-11-18 16:11:56 +03:00
|
|
|
MsgId lastSearchMigratedId() const;
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
enum class State {
|
|
|
|
Default,
|
|
|
|
Filtered,
|
2014-07-04 15:12:54 +04:00
|
|
|
};
|
|
|
|
State state() const;
|
2018-01-07 15:04:34 +03:00
|
|
|
bool waitingForSearch() const {
|
|
|
|
return _waitingForSearch;
|
|
|
|
}
|
2015-02-09 23:19:48 +00:00
|
|
|
bool hasFilteredResults() const;
|
2014-07-04 15:12:54 +04:00
|
|
|
|
2018-02-14 22:38:01 +03:00
|
|
|
void searchInChat(Dialogs::Key key, UserData *from);
|
2015-08-04 18:01:47 +03:00
|
|
|
|
2018-12-29 12:11:54 +04:00
|
|
|
void applyFilterUpdate(QString newFilter, bool force = false);
|
2015-06-15 20:19:24 +03:00
|
|
|
void onHashtagFilterUpdate(QStringRef newFilter);
|
2014-07-04 15:12:54 +04:00
|
|
|
|
2018-12-25 16:41:40 +04:00
|
|
|
PeerData *updateFromParentDrag(QPoint globalPosition);
|
2015-06-24 20:24:48 +03:00
|
|
|
|
2018-12-29 17:09:45 +04:00
|
|
|
void setLoadMoreCallback(Fn<void()> callback);
|
|
|
|
[[nodiscard]] rpl::producer<> listBottomReached() const;
|
2015-12-02 20:17:53 +03:00
|
|
|
|
2017-08-01 18:55:51 +03:00
|
|
|
base::Observable<UserData*> searchFromUserChanged;
|
|
|
|
|
2016-04-11 14:59:01 +04:00
|
|
|
void notify_historyMuteUpdated(History *history);
|
2015-12-13 14:17:15 +03:00
|
|
|
|
2015-09-29 16:24:39 +03:00
|
|
|
~DialogsInner();
|
2014-07-04 15:12:54 +04:00
|
|
|
|
2017-08-11 12:42:52 +02:00
|
|
|
public slots:
|
2014-05-30 12:53:19 +04:00
|
|
|
void onParentGeometryChanged();
|
2014-07-04 15:12:54 +04:00
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
signals:
|
2017-01-30 18:27:13 +03:00
|
|
|
void draggingScrollDelta(int delta);
|
2014-05-30 12:53:19 +04:00
|
|
|
void mustScrollTo(int scrollToTop, int scrollToBottom);
|
2015-09-24 19:05:06 +03:00
|
|
|
void dialogMoved(int movedFrom, int movedTo);
|
2014-07-04 15:12:54 +04:00
|
|
|
void searchMessages();
|
2018-11-20 16:40:54 +04:00
|
|
|
void clearSearchQuery();
|
2018-02-14 22:38:01 +03:00
|
|
|
void cancelSearchInChat();
|
2015-03-24 13:00:27 +03:00
|
|
|
void completeHashtag(QString tag);
|
2015-03-24 18:18:20 +03:00
|
|
|
void refreshHashtags();
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2015-09-29 16:24:39 +03:00
|
|
|
protected:
|
2017-09-13 19:57:44 +03:00
|
|
|
void visibleTopBottomUpdated(
|
|
|
|
int visibleTop,
|
|
|
|
int visibleBottom) override;
|
|
|
|
|
2019-04-16 13:29:21 +04:00
|
|
|
void paintEvent(QPaintEvent *e) override;
|
2016-12-04 22:40:41 +03:00
|
|
|
void mouseMoveEvent(QMouseEvent *e) override;
|
|
|
|
void mousePressEvent(QMouseEvent *e) override;
|
2016-12-05 14:01:08 +03:00
|
|
|
void mouseReleaseEvent(QMouseEvent *e) override;
|
2016-12-04 22:40:41 +03:00
|
|
|
void resizeEvent(QResizeEvent *e) override;
|
2017-02-11 14:24:37 +03:00
|
|
|
void enterEventHook(QEvent *e) override;
|
|
|
|
void leaveEventHook(QEvent *e) override;
|
2016-12-04 22:40:41 +03:00
|
|
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
2015-09-29 16:24:39 +03:00
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
private:
|
2016-12-05 14:01:08 +03:00
|
|
|
struct ImportantSwitch;
|
|
|
|
struct HashtagResult;
|
|
|
|
struct PeerSearchResult;
|
|
|
|
|
2018-12-29 17:09:45 +04:00
|
|
|
enum class JumpSkip {
|
|
|
|
PreviousOrBegin,
|
|
|
|
NextOrEnd,
|
|
|
|
PreviousOrOriginal,
|
|
|
|
NextOrOriginal,
|
|
|
|
};
|
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
struct ChosenRow {
|
|
|
|
Dialogs::Key key;
|
2018-02-16 18:46:24 +03:00
|
|
|
Data::MessagePosition message;
|
2018-01-07 15:04:34 +03:00
|
|
|
};
|
2019-04-16 18:05:56 +04:00
|
|
|
|
|
|
|
AuthSession &session() const;
|
|
|
|
|
|
|
|
void dialogRowReplaced(Dialogs::Row *oldRow, Dialogs::Row *newRow);
|
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
bool switchImportantChats();
|
|
|
|
bool chooseHashtag();
|
|
|
|
ChosenRow computeChosenRow() const;
|
2018-11-21 10:43:49 +04:00
|
|
|
bool isSearchResultActive(
|
|
|
|
not_null<Dialogs::FakeRow*> result,
|
|
|
|
const Dialogs::RowDescriptor &entry) const;
|
2018-01-07 15:04:34 +03:00
|
|
|
|
2018-12-25 16:41:40 +04:00
|
|
|
void clearMouseSelection(bool clearSelection = false);
|
|
|
|
void mousePressReleased(QPoint globalPosition, Qt::MouseButton button);
|
2016-12-05 14:01:08 +03:00
|
|
|
void clearIrrelevantState();
|
2018-12-25 16:41:40 +04:00
|
|
|
void selectByMouse(QPoint globalPosition);
|
2017-01-30 18:27:13 +03:00
|
|
|
void loadPeerPhotos();
|
2016-12-05 14:01:08 +03:00
|
|
|
void setImportantSwitchPressed(bool pressed);
|
|
|
|
void setPressed(Dialogs::Row *pressed);
|
|
|
|
void setHashtagPressed(int pressed);
|
|
|
|
void setFilteredPressed(int pressed);
|
|
|
|
void setPeerSearchPressed(int pressed);
|
|
|
|
void setSearchedPressed(int pressed);
|
|
|
|
bool isPressed() const {
|
2018-01-03 21:00:11 +03:00
|
|
|
return _importantSwitchPressed
|
|
|
|
|| _pressed
|
|
|
|
|| (_hashtagPressed >= 0)
|
|
|
|
|| (_filteredPressed >= 0)
|
|
|
|
|| (_peerSearchPressed >= 0)
|
|
|
|
|| (_searchedPressed >= 0);
|
2016-12-05 14:01:08 +03:00
|
|
|
}
|
|
|
|
bool isSelected() const {
|
2018-01-03 21:00:11 +03:00
|
|
|
return _importantSwitchSelected
|
|
|
|
|| _selected
|
|
|
|
|| (_hashtagSelected >= 0)
|
|
|
|
|| (_filteredSelected >= 0)
|
|
|
|
|| (_peerSearchSelected >= 0)
|
|
|
|
|| (_searchedSelected >= 0);
|
2016-12-05 14:01:08 +03:00
|
|
|
}
|
2018-10-09 18:36:06 +03:00
|
|
|
bool uniqueSearchResults() const;
|
2019-02-01 09:53:15 +03:00
|
|
|
bool hasHistoryInResults(not_null<History*> history) const;
|
2018-01-03 21:00:11 +03:00
|
|
|
|
2018-11-16 17:36:42 +04:00
|
|
|
void setupShortcuts();
|
2018-11-16 19:12:39 +04:00
|
|
|
Dialogs::RowDescriptor computeJump(
|
2018-11-16 17:36:42 +04:00
|
|
|
const Dialogs::RowDescriptor &to,
|
2018-12-29 17:09:45 +04:00
|
|
|
JumpSkip skip);
|
2018-12-30 16:50:23 +04:00
|
|
|
bool jumpToDialogRow(Dialogs::RowDescriptor to);
|
2018-11-16 17:36:42 +04:00
|
|
|
|
|
|
|
Dialogs::RowDescriptor chatListEntryBefore(
|
|
|
|
const Dialogs::RowDescriptor &which) const;
|
|
|
|
Dialogs::RowDescriptor chatListEntryAfter(
|
|
|
|
const Dialogs::RowDescriptor &which) const;
|
|
|
|
Dialogs::RowDescriptor chatListEntryFirst() const;
|
|
|
|
Dialogs::RowDescriptor chatListEntryLast() const;
|
|
|
|
|
2017-10-05 16:35:52 +01:00
|
|
|
void itemRemoved(not_null<const HistoryItem*> item);
|
2016-12-05 11:45:56 +03:00
|
|
|
enum class UpdateRowSection {
|
2017-09-03 21:36:06 +03:00
|
|
|
Default = (1 << 0),
|
|
|
|
Filtered = (1 << 1),
|
|
|
|
PeerSearch = (1 << 2),
|
|
|
|
MessageSearch = (1 << 3),
|
|
|
|
All = Default | Filtered | PeerSearch | MessageSearch,
|
2016-12-05 11:45:56 +03:00
|
|
|
};
|
2017-08-31 19:28:58 +03:00
|
|
|
using UpdateRowSections = base::flags<UpdateRowSection>;
|
|
|
|
friend inline constexpr auto is_flag_type(UpdateRowSection) { return true; };
|
|
|
|
|
2018-01-04 20:15:04 +03:00
|
|
|
void updateSearchResult(not_null<PeerData*> peer);
|
2018-01-03 21:00:11 +03:00
|
|
|
void updateDialogRow(
|
2018-01-22 19:42:25 +03:00
|
|
|
Dialogs::RowDescriptor row,
|
2018-12-30 12:40:25 +04:00
|
|
|
QRect updateRect = QRect(),
|
2018-01-03 21:00:11 +03:00
|
|
|
UpdateRowSections sections = UpdateRowSection::All);
|
2018-12-30 12:40:25 +04:00
|
|
|
void fillSupportSearchMenu(not_null<Ui::PopupMenu*> menu);
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2016-04-11 14:59:01 +04:00
|
|
|
int dialogsOffset() const;
|
2018-05-11 17:03:53 +03:00
|
|
|
int proxyPromotedCount() const;
|
|
|
|
int pinnedOffset() const;
|
2016-04-11 14:59:01 +04:00
|
|
|
int filteredOffset() const;
|
2016-12-05 14:01:08 +03:00
|
|
|
int peerSearchOffset() const;
|
2016-04-11 14:59:01 +04:00
|
|
|
int searchedOffset() const;
|
2018-02-14 22:38:01 +03:00
|
|
|
int searchInChatSkip() const;
|
2016-04-11 14:59:01 +04:00
|
|
|
|
2018-01-04 20:15:04 +03:00
|
|
|
void paintPeerSearchResult(
|
|
|
|
Painter &p,
|
|
|
|
not_null<const PeerSearchResult*> result,
|
|
|
|
int fullWidth,
|
|
|
|
bool active,
|
2019-04-16 13:29:21 +04:00
|
|
|
bool selected) const;
|
2018-02-14 22:38:01 +03:00
|
|
|
void paintSearchInChat(
|
2018-01-04 20:15:04 +03:00
|
|
|
Painter &p,
|
2019-04-16 13:29:21 +04:00
|
|
|
int fullWidth) const;
|
2018-02-14 22:38:01 +03:00
|
|
|
void paintSearchInPeer(
|
|
|
|
Painter &p,
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
int top,
|
|
|
|
int fullWidth,
|
|
|
|
const Text &text) const;
|
|
|
|
void paintSearchInSaved(
|
|
|
|
Painter &p,
|
|
|
|
int top,
|
|
|
|
int fullWidth,
|
|
|
|
const Text &text) const;
|
2019-04-15 15:54:03 +04:00
|
|
|
//void paintSearchInFeed( // #feed
|
|
|
|
// Painter &p,
|
|
|
|
// not_null<Data::Feed*> feed,
|
|
|
|
// int top,
|
|
|
|
// int fullWidth,
|
|
|
|
// const Text &text) const;
|
2018-02-14 22:38:01 +03:00
|
|
|
template <typename PaintUserpic>
|
2017-12-05 18:07:01 +04:00
|
|
|
void paintSearchInFilter(
|
|
|
|
Painter &p,
|
2018-02-14 22:38:01 +03:00
|
|
|
PaintUserpic paintUserpic,
|
2017-12-05 18:07:01 +04:00
|
|
|
int top,
|
|
|
|
int fullWidth,
|
2018-02-14 22:38:01 +03:00
|
|
|
const style::icon *icon,
|
2017-12-05 18:07:01 +04:00
|
|
|
const Text &text) const;
|
2018-02-14 22:38:01 +03:00
|
|
|
void refreshSearchInChatLabel();
|
2016-04-11 14:59:01 +04:00
|
|
|
|
|
|
|
void clearSelection();
|
2016-12-05 14:01:08 +03:00
|
|
|
void clearSearchResults(bool clearPeerSearchResults = true);
|
2018-01-05 18:57:18 +03:00
|
|
|
void updateSelectedRow(Dialogs::Key key = Dialogs::Key());
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2019-04-16 22:06:15 +04:00
|
|
|
not_null<Dialogs::IndexedList*> shownDialogs() const;
|
2016-04-11 14:59:01 +04:00
|
|
|
|
2017-01-30 18:27:13 +03:00
|
|
|
void checkReorderPinnedStart(QPoint localPosition);
|
|
|
|
int shownPinnedCount() const;
|
|
|
|
int updateReorderIndexGetCount();
|
|
|
|
bool updateReorderPinned(QPoint localPosition);
|
|
|
|
void finishReorderPinned();
|
|
|
|
void stopReorderPinned();
|
|
|
|
int countPinnedIndex(Dialogs::Row *ofRow);
|
|
|
|
void savePinnedOrder();
|
2019-04-01 21:44:54 +04:00
|
|
|
bool pinnedShiftAnimationCallback(crl::time now);
|
2019-01-14 10:34:51 +04:00
|
|
|
void handleChatMigration(not_null<ChatData*> chat);
|
2017-01-30 18:27:13 +03:00
|
|
|
|
2017-08-17 11:31:24 +03:00
|
|
|
not_null<Window::Controller*> _controller;
|
2017-04-09 21:06:06 +03:00
|
|
|
|
2016-12-05 14:01:08 +03:00
|
|
|
bool _mouseSelection = false;
|
2018-12-25 16:41:40 +04:00
|
|
|
std::optional<QPoint> _lastMousePosition;
|
2016-12-05 14:01:08 +03:00
|
|
|
Qt::MouseButton _pressButton = Qt::LeftButton;
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2019-04-17 17:22:37 +04:00
|
|
|
Data::Folder *_openedFolder = nullptr;
|
2017-02-21 16:45:56 +03:00
|
|
|
std::unique_ptr<ImportantSwitch> _importantSwitch;
|
2016-12-05 14:01:08 +03:00
|
|
|
bool _importantSwitchSelected = false;
|
|
|
|
bool _importantSwitchPressed = false;
|
|
|
|
Dialogs::Row *_selected = nullptr;
|
|
|
|
Dialogs::Row *_pressed = nullptr;
|
|
|
|
|
2017-01-30 18:27:13 +03:00
|
|
|
Dialogs::Row *_dragging = nullptr;
|
|
|
|
int _draggingIndex = -1;
|
|
|
|
int _aboveIndex = -1;
|
|
|
|
QPoint _dragStart;
|
|
|
|
struct PinnedRow {
|
|
|
|
anim::value yadd;
|
2019-02-19 10:57:53 +04:00
|
|
|
crl::time animStartTime = 0;
|
2017-01-30 18:27:13 +03:00
|
|
|
};
|
2017-02-21 16:45:56 +03:00
|
|
|
std::vector<PinnedRow> _pinnedRows;
|
2019-04-01 21:44:54 +04:00
|
|
|
Ui::Animations::Basic _pinnedShiftAnimation;
|
2018-01-04 22:54:35 +03:00
|
|
|
std::deque<Dialogs::Key> _pinnedOrder;
|
2017-01-30 18:27:13 +03:00
|
|
|
|
|
|
|
// Remember the last currently dragged row top shift for updating area.
|
|
|
|
int _aboveTopShift = -1;
|
|
|
|
|
|
|
|
int _visibleTop = 0;
|
|
|
|
int _visibleBottom = 0;
|
2015-11-18 16:11:56 +03:00
|
|
|
QString _filter, _hashtagFilter;
|
2015-03-24 13:00:27 +03:00
|
|
|
|
2019-02-01 09:53:15 +03:00
|
|
|
std::vector<std::unique_ptr<HashtagResult>> _hashtagResults;
|
2016-12-05 14:01:08 +03:00
|
|
|
int _hashtagSelected = -1;
|
|
|
|
int _hashtagPressed = -1;
|
|
|
|
bool _hashtagDeleteSelected = false;
|
|
|
|
bool _hashtagDeletePressed = false;
|
2015-03-24 13:00:27 +03:00
|
|
|
|
2019-02-01 09:53:15 +03:00
|
|
|
std::vector<Dialogs::Row*> _filterResults;
|
2018-01-22 13:58:11 +03:00
|
|
|
base::flat_map<
|
|
|
|
not_null<PeerData*>,
|
|
|
|
std::unique_ptr<Dialogs::Row>> _filterResultsGlobal;
|
2016-12-05 14:01:08 +03:00
|
|
|
int _filteredSelected = -1;
|
|
|
|
int _filteredPressed = -1;
|
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
bool _waitingForSearch = false;
|
|
|
|
|
2016-12-05 14:01:08 +03:00
|
|
|
QString _peerSearchQuery;
|
2019-02-01 09:53:15 +03:00
|
|
|
std::vector<std::unique_ptr<PeerSearchResult>> _peerSearchResults;
|
2016-12-05 14:01:08 +03:00
|
|
|
int _peerSearchSelected = -1;
|
|
|
|
int _peerSearchPressed = -1;
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2019-02-01 09:53:15 +03:00
|
|
|
std::vector<std::unique_ptr<Dialogs::FakeRow>> _searchResults;
|
2016-04-09 22:45:55 +04:00
|
|
|
int _searchedCount = 0;
|
|
|
|
int _searchedMigratedCount = 0;
|
2016-12-05 14:01:08 +03:00
|
|
|
int _searchedSelected = -1;
|
|
|
|
int _searchedPressed = -1;
|
2014-10-22 22:39:03 +04:00
|
|
|
|
2016-04-09 22:45:55 +04:00
|
|
|
int _lastSearchDate = 0;
|
|
|
|
PeerData *_lastSearchPeer = nullptr;
|
|
|
|
MsgId _lastSearchId = 0;
|
|
|
|
MsgId _lastSearchMigratedId = 0;
|
2014-08-22 11:41:39 +04:00
|
|
|
|
2018-01-07 15:04:34 +03:00
|
|
|
State _state = State::Default;
|
2014-07-04 15:12:54 +04:00
|
|
|
|
2016-12-13 20:07:56 +03:00
|
|
|
object_ptr<Ui::LinkButton> _addContactLnk;
|
2018-02-14 22:38:01 +03:00
|
|
|
object_ptr<Ui::IconButton> _cancelSearchInChat;
|
2017-08-06 22:07:51 +02:00
|
|
|
object_ptr<Ui::IconButton> _cancelSearchFromUser;
|
2014-11-25 15:15:29 +03:00
|
|
|
|
2018-02-14 22:38:01 +03:00
|
|
|
Dialogs::Key _searchInChat;
|
|
|
|
History *_searchInMigrated = nullptr;
|
2017-08-01 18:55:51 +03:00
|
|
|
UserData *_searchFromUser = nullptr;
|
2018-02-14 22:38:01 +03:00
|
|
|
Text _searchInChatText;
|
2017-08-06 22:07:51 +02:00
|
|
|
Text _searchFromUserText;
|
2018-12-30 12:40:25 +04:00
|
|
|
Dialogs::RowDescriptor _menuRow;
|
2015-12-02 20:17:53 +03:00
|
|
|
|
2018-06-04 18:35:11 +03:00
|
|
|
Fn<void()> _loadMoreCallback;
|
2018-12-29 17:09:45 +04:00
|
|
|
rpl::event_stream<> _listBottomReached;
|
2016-12-05 14:01:08 +03:00
|
|
|
|
2017-11-07 19:12:54 +04:00
|
|
|
base::unique_qptr<Ui::PopupMenu> _menu;
|
|
|
|
|
2014-05-30 12:53:19 +04:00
|
|
|
};
|