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

Send and delete messages through Histories.

This commit is contained in:
John Preston
2020-02-21 14:29:48 +04:00
parent 147e8cc467
commit 818f5cd004
8 changed files with 363 additions and 258 deletions

View File

@@ -57,18 +57,28 @@ public:
void changeDialogUnreadMark(not_null<History*> history, bool unread);
//void changeDialogUnreadMark(not_null<Data::Feed*> feed, bool unread); // #feed
void deleteMessages(
not_null<History*> history,
const QVector<MTPint> &ids,
bool revoke);
void deleteAllMessages(
not_null<History*> history,
MsgId deleteTillId,
bool justClear,
bool revoke);
int sendRequest(
not_null<History*> history,
RequestType type,
Fn<mtpRequestId(Fn<void()> done)> generator);
Fn<mtpRequestId(Fn<void()> finish)> generator);
void cancelRequest(not_null<History*> history, int id);
private:
struct PostponedHistoryRequest {
Fn<mtpRequestId(Fn<void()> done)> generator;
Fn<mtpRequestId(Fn<void()> finish)> generator;
};
struct SentRequest {
Fn<mtpRequestId(Fn<void()> done)> generator;
Fn<mtpRequestId(Fn<void()> finish)> generator;
mtpRequestId id = 0;
RequestType type = RequestType::None;
};