mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-30 09:11:43 +00:00
Fixed updating number of sessions after terminating any of them.
This commit is contained in:
@@ -128,9 +128,19 @@ void Authorizations::requestTerminate(
|
||||
const auto send = [&](auto request) {
|
||||
_api.request(
|
||||
std::move(request)
|
||||
).done(
|
||||
std::move(done)
|
||||
).fail(
|
||||
).done([=, done = std::move(done)](const MTPBool &result) {
|
||||
done(result);
|
||||
if (mtpIsTrue(result)) {
|
||||
if (hash) {
|
||||
_list.erase(
|
||||
ranges::remove(_list, *hash, &Entry::hash),
|
||||
end(_list));
|
||||
} else {
|
||||
_list.clear();
|
||||
}
|
||||
_listChanges.fire({});
|
||||
}
|
||||
}).fail(
|
||||
std::move(fail)
|
||||
).send();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user