2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Replace base/task_queue with crl.

This commit is contained in:
John Preston
2017-12-31 00:28:38 +03:00
parent ae7e5be5cd
commit af552fb4c0
21 changed files with 135 additions and 604 deletions

View File

@@ -51,7 +51,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "window/themes/window_theme.h"
#include "window/themes/window_theme_warning.h"
#include "window/window_main_menu.h"
#include "base/task_queue.h"
#include "auth_session.h"
#include "window/window_controller.h"
@@ -535,24 +534,23 @@ void MainWindow::themeUpdated(const Window::Theme::BackgroundUpdate &data) {
_testingThemeWarning->setGeometry(rect());
_testingThemeWarning->setHiddenCallback([this] { _testingThemeWarning.destroyDelayed(); });
}
base::TaskQueue::Main().Put(base::lambda_guarded(this, [this] {
crl::on_main(this, [=] {
if (_testingThemeWarning) {
_testingThemeWarning->showAnimated();
}
}));
});
} else if (data.type == Type::RevertingTheme || data.type == Type::ApplyingTheme) {
if (_testingThemeWarning) {
if (_testingThemeWarning->isHidden()) {
_testingThemeWarning.destroy();
} else {
base::TaskQueue::Main().Put(base::lambda_guarded(this, [this] {
crl::on_main(this, [=] {
if (_testingThemeWarning) {
_testingThemeWarning->hideAnimated();
_testingThemeWarning = nullptr;
}
setInnerFocus();
}));
});
}
}
}