Simplify SendProgressManager::done prototype.

This commit is contained in:
John Preston 2022-11-10 09:19:43 +04:00
parent ca460dab6d
commit b514496546
2 changed files with 3 additions and 5 deletions

View file

@ -141,7 +141,7 @@ void SendProgressManager::send(const Key &key, int progress) {
MTP_int(key.topMsgId),
action
)).done([=](const MTPBool &result, mtpRequestId requestId) {
done(result, requestId);
done(requestId);
}).send();
_requests.emplace(key, requestId);
@ -171,9 +171,7 @@ bool SendProgressManager::skipRequest(const Key &key) const {
}
}
void SendProgressManager::done(
const MTPBool &result,
mtpRequestId requestId) {
void SendProgressManager::done(mtpRequestId requestId) {
for (auto i = _requests.begin(), e = _requests.end(); i != e; ++i) {
if (i->second == requestId) {
_requests.erase(i);

View file

@ -90,7 +90,7 @@ private:
bool updated(const Key &key, bool doing);
void send(const Key &key, int progress);
void done(const MTPBool &result, mtpRequestId requestId);
void done(mtpRequestId requestId);
[[nodiscard]] bool skipRequest(const Key &key) const;