mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Simplify SendProgressManager::done prototype.
This commit is contained in:
parent
ca460dab6d
commit
b514496546
2 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue