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

Use base::call_delayed.

This commit is contained in:
John Preston
2019-09-26 13:55:35 +03:00
parent 09a7daf164
commit 30a1bd7ba2
29 changed files with 68 additions and 83 deletions

View File

@@ -28,6 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "base/openssl_help.h"
#include "base/unixtime.h"
#include "base/call_delayed.h"
#include "observer_peer.h"
#include "lang/lang_keys.h"
#include "mainwindow.h"
@@ -361,7 +362,7 @@ void ApiWrap::requestTermsUpdate() {
}
const auto now = crl::now();
if (_termsUpdateSendAt && now < _termsUpdateSendAt) {
App::CallDelayed(_termsUpdateSendAt - now, _session, [=] {
base::call_delayed(_termsUpdateSendAt - now, _session, [=] {
requestTermsUpdate();
});
return;
@@ -1283,7 +1284,7 @@ void ApiWrap::gotUserFull(
const auto &d = result.c_userFull();
if (user == _session->user() && !_session->validateSelf(d.vuser())) {
constexpr auto kRequestUserAgainTimeout = crl::time(10000);
App::CallDelayed(kRequestUserAgainTimeout, _session, [=] {
base::call_delayed(kRequestUserAgainTimeout, _session, [=] {
requestFullPeer(user);
});
return;