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

Search through Histories.

This commit is contained in:
John Preston
2020-02-21 16:57:06 +04:00
parent 6f672ecdc3
commit ec7a2dce2f
6 changed files with 168 additions and 110 deletions

View File

@@ -72,7 +72,7 @@ public:
not_null<History*> history,
RequestType type,
Fn<mtpRequestId(Fn<void()> finish)> generator);
void cancelRequest(not_null<History*> history, int id);
void cancelRequest(int id);
private:
struct PostponedHistoryRequest {
@@ -88,7 +88,6 @@ private:
base::flat_map<int, SentRequest> sent;
crl::time readWhen = 0;
MsgId readTill = 0;
int autoincrement = 0;
bool postponedRequestEntry = false;
};
@@ -112,6 +111,8 @@ private:
std::unordered_map<PeerId, std::unique_ptr<History>> _map;
base::flat_map<not_null<History*>, State> _states;
base::flat_map<int, not_null<History*>> _historyByRequest;
int _requestAutoincrement = 0;
base::Timer _readRequestsTimer;
base::flat_set<not_null<Data::Folder*>> _dialogFolderRequests;