2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Improve base::binary_guard interface.

This commit is contained in:
John Preston
2019-03-27 16:11:38 +04:00
parent efb2972d28
commit d3bf489bea
12 changed files with 38 additions and 54 deletions

View File

@@ -1134,8 +1134,8 @@ base::binary_guard LanguageBox::Show() {
const auto manager = Core::App().langCloudManager();
if (manager->languageList().empty()) {
auto guard = std::make_shared<base::binary_guard>();
std::tie(result, *guard) = base::make_binary_guard();
auto guard = std::make_shared<base::binary_guard>(
result.make_guard());
auto alive = std::make_shared<std::unique_ptr<base::Subscription>>(
std::make_unique<base::Subscription>());
**alive = manager->languageListChanged().add_subscription([=] {