diff --git a/Telegram/SourceFiles/data/business/data_business_common.h b/Telegram/SourceFiles/data/business/data_business_common.h index be281d0ad2..c480a8579f 100644 --- a/Telegram/SourceFiles/data/business/data_business_common.h +++ b/Telegram/SourceFiles/data/business/data_business_common.h @@ -36,7 +36,7 @@ struct BusinessChats { struct BusinessRecipients { BusinessChats included; BusinessChats excluded; - bool onlyIncluded = false; + bool allButExcluded = false; friend inline bool operator==( const BusinessRecipients &a, diff --git a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp index a6288dbee7..83c11a9cd3 100644 --- a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp +++ b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp @@ -165,7 +165,7 @@ void AddBusinessRecipientsSelector( *data = std::move(now); }; const auto group = std::make_shared( - data->current().onlyIncluded ? kSelectedOnly : kAllExcept); + data->current().allButExcluded ? kAllExcept : kSelectedOnly); const auto everyone = container->add( object_ptr( container, @@ -231,7 +231,7 @@ void AddBusinessRecipientsSelector( excludeWrap->toggleOn(data->value( ) | rpl::map([](const Data::BusinessRecipients &value) { - return !value.onlyIncluded; + return value.allButExcluded; })); excludeWrap->finishAnimating(); @@ -280,13 +280,13 @@ void AddBusinessRecipientsSelector( includeWrap->toggleOn(data->value( ) | rpl::map([](const Data::BusinessRecipients &value) { - return value.onlyIncluded; + return !value.allButExcluded; })); includeWrap->finishAnimating(); group->setChangedCallback([=](int value) { change([&](Data::BusinessRecipients &data) { - data.onlyIncluded = (value == kSelectedOnly); + data.allButExcluded = (value == kAllExcept); }); }); }