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

Accept binary_guard in crl::guard().

This commit is contained in:
John Preston
2019-02-17 15:52:57 +04:00
parent 4d987f7278
commit d208236994
8 changed files with 30 additions and 36 deletions

View File

@@ -1624,14 +1624,10 @@ base::binary_guard ReadImageAsync(
if (postprocess) {
image = postprocess(std::move(image));
}
crl::on_main([
guard = std::move(guard),
crl::on_main(std::move(guard), [
image = std::move(image),
callback = std::move(callback)
]() mutable {
if (!guard) {
return;
}
callback(std::move(image));
});
});