2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Load chats in chunks in support mode.

This commit is contained in:
John Preston
2018-11-09 17:54:34 +04:00
parent 2d05281ba9
commit e992702783
6 changed files with 263 additions and 43 deletions

View File

@@ -152,6 +152,7 @@ private:
const QVector<MTPDialog> &dialogs,
const QVector<MTPMessage> &messages);
void setupSupportLoadingLimit();
void setupConnectingWidget();
bool searchForPeersRequired(const QString &query) const;
void setSearchInChat(Dialogs::Key chat, UserData *from = nullptr);
@@ -166,6 +167,9 @@ private:
void updateForwardBar();
void checkUpdateStatus();
bool loadingBlockedByDate() const;
void refreshLoadMoreButton();
bool dialogsFailed(const RPCError &error, mtpRequestId req);
bool searchFailed(DialogsSearchRequestType type, const RPCError &error, mtpRequestId req);
bool peopleFailed(const RPCError &error, mtpRequestId req);
@@ -175,7 +179,8 @@ private:
QTimer _chooseByDragTimer;
bool _dialogsFull = false;
int32 _dialogsOffsetDate = 0;
TimeId _dialogsLoadTill = 0;
TimeId _dialogsOffsetDate = 0;
MsgId _dialogsOffsetId = 0;
PeerData *_dialogsOffsetPeer = nullptr;
mtpRequestId _dialogsRequestId = 0;
@@ -191,8 +196,9 @@ private:
object_ptr<Ui::IconButton> _lockUnlock;
object_ptr<Ui::ScrollArea> _scroll;
QPointer<DialogsInner> _inner;
class UpdateButton;
object_ptr<UpdateButton> _updateTelegram = { nullptr };
class BottomButton;
object_ptr<BottomButton> _updateTelegram = { nullptr };
object_ptr<BottomButton> _loadMoreChats = { nullptr };
base::unique_qptr<Window::ConnectingWidget> _connecting;
Animation _a_show;