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
@@ -722,16 +722,12 @@ void BackgroundPreviewBox::checkLoadedDocument() {
: PrepareScaledNonPattern(
Data::PrepareBlurredBackground(image),
Images::Option(0));
crl::on_main([
crl::on_main(std::move(guard), [
this,
image = std::move(image),
scaled = std::move(scaled),
blurred = std::move(blurred),
guard = std::move(guard)
blurred = std::move(blurred)
]() mutable {
if (!guard) {
return;
}
_full = std::move(image);
setScaledFromImage(std::move(scaled), std::move(blurred));
update();