2014-05-30 08:53:19 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2014-12-01 10:47:38 +00:00
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
2015-10-03 13:16:42 +00:00
|
|
|
In addition, as a special exception, the copyright holders give permission
|
|
|
|
to link the code of portions of this program with the OpenSSL library.
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2016-02-08 10:56:18 +00:00
|
|
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
2014-05-30 08:53:19 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-05-19 12:03:51 +00:00
|
|
|
#include "window/section_widget.h"
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
class MainWidget;
|
2016-04-09 18:45:55 +00:00
|
|
|
namespace Dialogs {
|
|
|
|
class Row;
|
|
|
|
class FakeRow;
|
|
|
|
class IndexedList;
|
|
|
|
} // namespace Dialogs
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2016-06-20 15:40:36 +00:00
|
|
|
namespace Ui {
|
|
|
|
class RoundButton;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
enum DialogsSearchRequestType {
|
|
|
|
DialogsSearchFromStart,
|
|
|
|
DialogsSearchFromOffset,
|
|
|
|
DialogsSearchPeerFromStart,
|
|
|
|
DialogsSearchPeerFromOffset,
|
|
|
|
DialogsSearchMigratedFromStart,
|
|
|
|
DialogsSearchMigratedFromOffset,
|
|
|
|
};
|
|
|
|
|
2015-12-02 17:17:53 +00:00
|
|
|
class DialogsInner : public SplittedWidget, public RPCSender {
|
2014-05-30 08:53:19 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2015-09-29 13:24:39 +00:00
|
|
|
DialogsInner(QWidget *parent, MainWidget *main);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void dialogsReceived(const QVector<MTPDialog> &dialogs);
|
2015-09-06 10:17:09 +00:00
|
|
|
void addSavedPeersAfter(const QDateTime &date);
|
2015-08-07 12:11:50 +00:00
|
|
|
void addAllSavedPeers();
|
2015-11-18 13:11:56 +00:00
|
|
|
bool searchReceived(const QVector<MTPMessage> &messages, DialogsSearchRequestType type, int32 fullCount);
|
2015-09-06 10:17:09 +00:00
|
|
|
void peopleReceived(const QString &query, const QVector<MTPPeer> &people);
|
2014-05-30 08:53:19 +00:00
|
|
|
void showMore(int32 pixels);
|
|
|
|
|
|
|
|
void activate();
|
|
|
|
|
|
|
|
void contactsReceived(const QVector<MTPContact> &contacts);
|
|
|
|
|
|
|
|
void mouseMoveEvent(QMouseEvent *e);
|
|
|
|
void mousePressEvent(QMouseEvent *e);
|
2014-11-25 12:15:29 +00:00
|
|
|
void resizeEvent(QResizeEvent *e);
|
2014-05-30 08:53:19 +00:00
|
|
|
void enterEvent(QEvent *e);
|
|
|
|
void leaveEvent(QEvent *e);
|
2015-12-02 17:17:53 +00:00
|
|
|
void contextMenuEvent(QContextMenuEvent *e);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void selectSkip(int32 direction);
|
|
|
|
void selectSkipPage(int32 pixels, int32 direction);
|
|
|
|
|
2015-09-21 20:57:42 +00:00
|
|
|
void createDialog(History *history);
|
2016-04-11 10:59:01 +00:00
|
|
|
void dlgUpdated(Dialogs::Mode list, Dialogs::Row *row);
|
2015-10-03 10:09:09 +00:00
|
|
|
void dlgUpdated(History *row, MsgId msgId);
|
2015-11-13 15:14:33 +00:00
|
|
|
void removeDialog(History *history);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void loadPeerPhotos(int32 yFrom);
|
|
|
|
void clearFilter();
|
|
|
|
void refresh(bool toTop = false);
|
|
|
|
|
2014-07-04 11:12:54 +00:00
|
|
|
bool choosePeer();
|
2015-03-24 10:00:27 +00:00
|
|
|
void saveRecentHashtags(const QString &text);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void destroyData();
|
|
|
|
|
2014-08-22 07:41:39 +00:00
|
|
|
void peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const;
|
|
|
|
void peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const;
|
|
|
|
void scrollToPeer(const PeerId &peer, MsgId msgId);
|
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
typedef QVector<Dialogs::Row*> FilteredDialogs;
|
2015-09-06 10:17:09 +00:00
|
|
|
typedef QVector<PeerData*> PeopleResults;
|
2016-04-09 18:45:55 +00:00
|
|
|
typedef QVector<Dialogs::FakeRow*> SearchResults;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
Dialogs::IndexedList *contactsList();
|
|
|
|
Dialogs::IndexedList *dialogsList();
|
2014-10-22 18:39:03 +00:00
|
|
|
FilteredDialogs &filteredList();
|
|
|
|
PeopleResults &peopleList();
|
2014-07-04 11:12:54 +00:00
|
|
|
SearchResults &searchList();
|
2015-11-18 13:11:56 +00:00
|
|
|
int32 lastSearchDate() const;
|
|
|
|
PeerData *lastSearchPeer() const;
|
2014-08-22 07:41:39 +00:00
|
|
|
MsgId lastSearchId() const;
|
2015-11-18 13:11:56 +00:00
|
|
|
MsgId lastSearchMigratedId() const;
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void setMouseSel(bool msel, bool toTop = false);
|
|
|
|
|
2014-07-04 11:12:54 +00:00
|
|
|
enum State {
|
|
|
|
DefaultState = 0,
|
|
|
|
FilteredState = 1,
|
|
|
|
SearchedState = 2,
|
|
|
|
};
|
|
|
|
void setState(State newState);
|
|
|
|
State state() const;
|
2015-02-09 23:19:48 +00:00
|
|
|
bool hasFilteredResults() const;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-08-04 15:01:47 +00:00
|
|
|
void searchInPeer(PeerData *peer);
|
|
|
|
|
2014-07-04 11:12:54 +00:00
|
|
|
void onFilterUpdate(QString newFilter, bool force = false);
|
2015-06-15 17:19:24 +00:00
|
|
|
void onHashtagFilterUpdate(QStringRef newFilter);
|
2014-10-10 12:46:20 +00:00
|
|
|
void itemRemoved(HistoryItem *item);
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-06-24 17:24:48 +00:00
|
|
|
PeerData *updateFromParentDrag(QPoint globalPos);
|
|
|
|
|
2015-12-02 17:17:53 +00:00
|
|
|
void updateNotifySettings(PeerData *peer);
|
|
|
|
|
2015-12-13 11:17:15 +00:00
|
|
|
void notify_userIsContactChanged(UserData *user, bool fromThisApp);
|
2016-04-11 10:59:01 +00:00
|
|
|
void notify_historyMuteUpdated(History *history);
|
2015-12-13 11:17:15 +00:00
|
|
|
|
2015-09-29 13:24:39 +00:00
|
|
|
~DialogsInner();
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
public slots:
|
|
|
|
|
|
|
|
void onUpdateSelected(bool force = false);
|
|
|
|
void onParentGeometryChanged();
|
|
|
|
void onPeerNameChanged(PeerData *peer, const PeerData::Names &oldNames, const PeerData::NameFirstChars &oldChars);
|
|
|
|
void onPeerPhotoChanged(PeerData *peer);
|
2016-04-09 18:45:55 +00:00
|
|
|
void onDialogRowReplaced(Dialogs::Row *oldRow, Dialogs::Row *newRow);
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-12-02 17:17:53 +00:00
|
|
|
void onContextProfile();
|
|
|
|
void onContextToggleNotifications();
|
|
|
|
void onContextSearch();
|
|
|
|
void onContextClearHistory();
|
|
|
|
void onContextClearHistorySure();
|
|
|
|
void onContextDeleteAndLeave();
|
|
|
|
void onContextDeleteAndLeaveSure();
|
|
|
|
void onContextToggleBlock();
|
|
|
|
|
|
|
|
void onMenuDestroyed(QObject*);
|
|
|
|
|
|
|
|
void peerUpdated(PeerData *peer);
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void mustScrollTo(int scrollToTop, int scrollToBottom);
|
2015-09-24 16:05:06 +00:00
|
|
|
void dialogMoved(int movedFrom, int movedTo);
|
2014-07-04 11:12:54 +00:00
|
|
|
void searchMessages();
|
2014-10-22 18:39:03 +00:00
|
|
|
void searchResultChosen();
|
2015-08-04 15:01:47 +00:00
|
|
|
void cancelSearchInPeer();
|
2015-03-24 10:00:27 +00:00
|
|
|
void completeHashtag(QString tag);
|
2015-03-24 15:18:20 +00:00
|
|
|
void refreshHashtags();
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-09-29 13:24:39 +00:00
|
|
|
protected:
|
|
|
|
|
|
|
|
void paintRegion(Painter &p, const QRegion ®ion, bool paintingOther);
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
private:
|
|
|
|
|
2016-04-11 10:59:01 +00:00
|
|
|
int dialogsOffset() const;
|
|
|
|
int filteredOffset() const;
|
|
|
|
int peopleOffset() const;
|
|
|
|
int searchedOffset() const;
|
|
|
|
|
|
|
|
void peopleResultPaint(PeerData *peer, Painter &p, int32 w, bool active, bool selected, bool onlyBackground) const;
|
|
|
|
void searchInPeerPaint(Painter &p, int32 w, bool onlyBackground) const;
|
|
|
|
|
|
|
|
void clearSelection();
|
2014-10-22 18:39:03 +00:00
|
|
|
void clearSearchResults(bool clearPeople = true);
|
2015-12-02 17:17:53 +00:00
|
|
|
void updateSelectedRow(PeerData *peer = 0);
|
|
|
|
bool menuPeerMuted();
|
|
|
|
void contextBlockDone(QPair<UserData*, bool> data, const MTPBool &result);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2016-04-11 10:59:01 +00:00
|
|
|
Dialogs::IndexedList *shownDialogs() const {
|
|
|
|
return (Global::DialogsMode() == Dialogs::Mode::Important) ? importantDialogs.get() : dialogs.get();
|
|
|
|
}
|
|
|
|
|
2016-04-10 19:20:48 +00:00
|
|
|
using DialogsList = std_::unique_ptr<Dialogs::IndexedList>;
|
2016-04-09 18:45:55 +00:00
|
|
|
DialogsList dialogs;
|
2016-04-11 10:59:01 +00:00
|
|
|
DialogsList importantDialogs;
|
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
DialogsList contactsNoDialogs;
|
|
|
|
DialogsList contacts;
|
2016-04-11 10:59:01 +00:00
|
|
|
|
|
|
|
bool _importantSwitchSel = false;
|
|
|
|
Dialogs::Row *_sel = nullptr;
|
|
|
|
bool _selByMouse = false;
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
QString _filter, _hashtagFilter;
|
2015-03-24 10:00:27 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
QStringList _hashtagResults;
|
2016-04-09 18:45:55 +00:00
|
|
|
int _hashtagSel = -1;
|
2015-03-24 10:00:27 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
FilteredDialogs _filterResults;
|
2016-04-09 18:45:55 +00:00
|
|
|
int _filteredSel = -1;
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
SearchResults _searchResults;
|
2016-04-09 18:45:55 +00:00
|
|
|
int _searchedCount = 0;
|
|
|
|
int _searchedMigratedCount = 0;
|
|
|
|
int _searchedSel = -1;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
QString _peopleQuery;
|
|
|
|
PeopleResults _peopleResults;
|
2016-04-09 18:45:55 +00:00
|
|
|
int _peopleSel = -1;
|
2014-10-22 18:39:03 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
int _lastSearchDate = 0;
|
|
|
|
PeerData *_lastSearchPeer = nullptr;
|
|
|
|
MsgId _lastSearchId = 0;
|
|
|
|
MsgId _lastSearchMigratedId = 0;
|
2014-08-22 07:41:39 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
State _state = DefaultState;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
QPoint lastMousePos;
|
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
void paintDialog(QPainter &p, Dialogs::Row *dialog);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2014-11-25 12:15:29 +00:00
|
|
|
LinkButton _addContactLnk;
|
2015-08-04 15:01:47 +00:00
|
|
|
IconedButton _cancelSearchInPeer;
|
2014-11-25 12:15:29 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
bool _overDelete = false;
|
2015-03-24 15:18:20 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
PeerData *_searchInPeer = nullptr;
|
|
|
|
PeerData *_searchInMigrated = nullptr;
|
|
|
|
PeerData *_menuPeer = nullptr;
|
|
|
|
PeerData *_menuActionPeer = nullptr;
|
2015-12-02 17:17:53 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
PopupMenu *_menu = nullptr;
|
2015-08-04 15:01:47 +00:00
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
};
|
|
|
|
|
2015-10-17 14:52:26 +00:00
|
|
|
class DialogsWidget : public TWidget, public RPCSender {
|
2014-05-30 08:53:19 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
DialogsWidget(MainWidget *parent);
|
|
|
|
|
2015-09-03 13:15:07 +00:00
|
|
|
void dialogsReceived(const MTPmessages_Dialogs &dialogs, mtpRequestId req);
|
2014-05-30 08:53:19 +00:00
|
|
|
void contactsReceived(const MTPcontacts_Contacts &contacts);
|
2015-11-18 13:11:56 +00:00
|
|
|
void searchReceived(DialogsSearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req);
|
2014-10-22 18:39:03 +00:00
|
|
|
void peopleReceived(const MTPcontacts_Found &result, mtpRequestId req);
|
2016-02-28 11:58:30 +00:00
|
|
|
|
2016-03-01 02:36:23 +00:00
|
|
|
void dragEnterEvent(QDragEnterEvent *e) override;
|
|
|
|
void dragMoveEvent(QDragMoveEvent *e) override;
|
|
|
|
void dragLeaveEvent(QDragLeaveEvent *e) override;
|
|
|
|
void dropEvent(QDropEvent *e) override;
|
2015-06-24 17:24:48 +00:00
|
|
|
void updateDragInScroll(bool inScroll);
|
|
|
|
|
2016-03-01 02:36:23 +00:00
|
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
|
|
void keyPressEvent(QKeyEvent *e) override;
|
|
|
|
void paintEvent(QPaintEvent *e) override;
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-08-04 15:01:47 +00:00
|
|
|
void searchInPeer(PeerData *peer);
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
void loadDialogs();
|
2015-09-21 20:57:42 +00:00
|
|
|
void createDialog(History *history);
|
2016-04-11 10:59:01 +00:00
|
|
|
void dlgUpdated(Dialogs::Mode list, Dialogs::Row *row);
|
2015-10-03 10:09:09 +00:00
|
|
|
void dlgUpdated(History *row, MsgId msgId);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void dialogsToUp();
|
|
|
|
|
2016-05-19 12:03:51 +00:00
|
|
|
bool hasTopBarShadow() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
void showAnimated(Window::SlideDirection direction, const Window::SectionSlideParams ¶ms);
|
2015-12-08 12:33:37 +00:00
|
|
|
void step_show(float64 ms, bool timer);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
void destroyData();
|
|
|
|
|
2014-08-22 07:41:39 +00:00
|
|
|
void peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const;
|
|
|
|
void peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const;
|
|
|
|
void scrollToPeer(const PeerId &peer, MsgId msgId);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-11-13 15:14:33 +00:00
|
|
|
void removeDialog(History *history);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2016-04-09 18:45:55 +00:00
|
|
|
Dialogs::IndexedList *contactsList();
|
|
|
|
Dialogs::IndexedList *dialogsList();
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-09-21 20:57:42 +00:00
|
|
|
void searchMessages(const QString &query, PeerData *inPeer = 0);
|
2015-11-18 13:11:56 +00:00
|
|
|
void onSearchMore();
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2014-10-10 12:46:20 +00:00
|
|
|
void itemRemoved(HistoryItem *item);
|
|
|
|
|
2015-12-02 17:17:53 +00:00
|
|
|
void updateNotifySettings(PeerData *peer);
|
|
|
|
|
2016-02-28 12:36:23 +00:00
|
|
|
void rpcClear() override {
|
|
|
|
_inner.rpcClear();
|
|
|
|
RPCSender::rpcClear();
|
|
|
|
}
|
|
|
|
|
2015-12-13 11:17:15 +00:00
|
|
|
void notify_userIsContactChanged(UserData *user, bool fromThisApp);
|
2016-04-11 10:59:01 +00:00
|
|
|
void notify_historyMuteUpdated(History *history);
|
2015-12-13 11:17:15 +00:00
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void cancelled();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void onCancel();
|
|
|
|
void onListScroll();
|
|
|
|
void activate();
|
2014-12-12 16:27:03 +00:00
|
|
|
void onFilterUpdate(bool force = false);
|
2014-05-30 08:53:19 +00:00
|
|
|
void onAddContact();
|
|
|
|
void onNewGroup();
|
2014-12-12 16:27:03 +00:00
|
|
|
bool onCancelSearch();
|
2015-08-04 15:01:47 +00:00
|
|
|
void onCancelSearchInPeer();
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-03-24 15:18:20 +00:00
|
|
|
void onFilterCursorMoved(int from = -1, int to = -1);
|
2015-03-24 10:00:27 +00:00
|
|
|
void onCompleteHashtag(QString tag);
|
|
|
|
|
2015-09-24 16:05:06 +00:00
|
|
|
void onDialogMoved(int movedFrom, int movedTo);
|
2014-07-13 09:50:38 +00:00
|
|
|
bool onSearchMessages(bool searchCache = false);
|
|
|
|
void onNeedSearchMessages();
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-06-26 09:07:59 +00:00
|
|
|
void onChooseByDrag();
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
private:
|
|
|
|
|
2015-06-24 17:24:48 +00:00
|
|
|
bool _dragInScroll, _dragForward;
|
2015-06-26 09:07:59 +00:00
|
|
|
QTimer _chooseByDragTimer;
|
2015-06-24 17:24:48 +00:00
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
void unreadCountsReceived(const QVector<MTPDialog> &dialogs);
|
2015-09-03 13:15:07 +00:00
|
|
|
bool dialogsFailed(const RPCError &error, mtpRequestId req);
|
2015-04-04 20:01:34 +00:00
|
|
|
bool contactsFailed(const RPCError &error);
|
2015-11-18 13:11:56 +00:00
|
|
|
bool searchFailed(DialogsSearchRequestType type, const RPCError &error, mtpRequestId req);
|
2014-10-22 18:39:03 +00:00
|
|
|
bool peopleFailed(const RPCError &error, mtpRequestId req);
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2015-11-18 14:59:17 +00:00
|
|
|
bool _dialogsFull;
|
|
|
|
int32 _dialogsOffsetDate;
|
|
|
|
MsgId _dialogsOffsetId;
|
|
|
|
PeerData *_dialogsOffsetPeer;
|
|
|
|
mtpRequestId _dialogsRequest, _contactsRequest;
|
2014-05-30 08:53:19 +00:00
|
|
|
|
|
|
|
FlatInput _filter;
|
2016-06-20 15:40:36 +00:00
|
|
|
ChildWidget<Ui::RoundButton> _newGroup;
|
|
|
|
IconedButton _addContact, _cancelSearch;
|
2015-09-29 13:24:39 +00:00
|
|
|
ScrollArea _scroll;
|
|
|
|
DialogsInner _inner;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2015-10-17 14:52:26 +00:00
|
|
|
Animation _a_show;
|
|
|
|
QPixmap _cacheUnder, _cacheOver;
|
|
|
|
anim::ivalue a_coordUnder, a_coordOver;
|
2016-05-19 12:03:51 +00:00
|
|
|
anim::fvalue a_progress;
|
2014-12-12 16:27:03 +00:00
|
|
|
|
2015-11-18 13:11:56 +00:00
|
|
|
PeerData *_searchInPeer, *_searchInMigrated;
|
2015-08-04 15:01:47 +00:00
|
|
|
|
2014-07-13 09:50:38 +00:00
|
|
|
QTimer _searchTimer;
|
2014-10-22 18:39:03 +00:00
|
|
|
QString _searchQuery, _peopleQuery;
|
2015-11-18 13:11:56 +00:00
|
|
|
bool _searchFull, _searchFullMigrated, _peopleFull;
|
2014-10-22 18:39:03 +00:00
|
|
|
mtpRequestId _searchRequest, _peopleRequest;
|
2014-07-04 11:12:54 +00:00
|
|
|
|
2014-07-13 09:50:38 +00:00
|
|
|
typedef QMap<QString, MTPmessages_Messages> SearchCache;
|
|
|
|
SearchCache _searchCache;
|
|
|
|
|
|
|
|
typedef QMap<mtpRequestId, QString> SearchQueries;
|
|
|
|
SearchQueries _searchQueries;
|
|
|
|
|
2014-10-22 18:39:03 +00:00
|
|
|
typedef QMap<QString, MTPcontacts_Found> PeopleCache;
|
|
|
|
PeopleCache _peopleCache;
|
|
|
|
|
|
|
|
typedef QMap<mtpRequestId, QString> PeopleQueries;
|
|
|
|
PeopleQueries _peopleQueries;
|
|
|
|
|
2014-05-30 08:53:19 +00:00
|
|
|
};
|