mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Testing crl (concurrency runtime library).
This commit is contained in:
@@ -1596,9 +1596,9 @@ void MediaView::initThemePreview() {
|
||||
current.backgroundId = Window::Theme::Background()->id();
|
||||
current.backgroundImage = Window::Theme::Background()->pixmap();
|
||||
current.backgroundTiled = Window::Theme::Background()->tile();
|
||||
base::TaskQueue::Normal().Put([ready = std::move(ready), path, current]() mutable {
|
||||
crl::async([=] {
|
||||
auto preview = Window::Theme::GeneratePreview(path, current);
|
||||
base::TaskQueue::Main().Put([ready = std::move(ready), result = std::move(preview)]() mutable {
|
||||
crl::on_main([ready, result = std::move(preview)]() mutable {
|
||||
ready(std::move(result));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user