2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -21,9 +21,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "apiwrap.h"
#include "core/application.h"
#include "base/unixtime.h"
#include "lang/lang_instance.h"
#include "lang/lang_cloud_manager.h"
#include "base/unixtime.h"
#include "base/call_delayed.h"
#include "base/timer.h"
#include "facades.h"
@@ -450,7 +451,7 @@ void Instance::Private::requestConfigIfOld() {
void Instance::Private::requestConfigIfExpired() {
const auto requestIn = (_configExpiresAt - crl::now());
if (requestIn > 0) {
App::CallDelayed(
base::call_delayed(
std::min(requestIn, 3600 * crl::time(1000)),
_instance,
[=] { requestConfigIfExpired(); });