mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix calls peer-to-peer privacy button icon.
This commit is contained in:
parent
4e046ca31a
commit
04a969cc5f
3 changed files with 7 additions and 4 deletions
|
@ -764,7 +764,8 @@ object_ptr<Ui::RpWidget> CallsPrivacyController::setupBelowWidget(
|
||||||
tr::lng_settings_calls_peer_to_peer_button(),
|
tr::lng_settings_calls_peer_to_peer_button(),
|
||||||
{ &st::settingsIconArrows, kIconLightBlue },
|
{ &st::settingsIconArrows, kIconLightBlue },
|
||||||
UserPrivacy::Key::CallsPeer2Peer,
|
UserPrivacy::Key::CallsPeer2Peer,
|
||||||
[] { return std::make_unique<CallsPeer2PeerPrivacyController>(); });
|
[] { return std::make_unique<CallsPeer2PeerPrivacyController>(); },
|
||||||
|
&st::settingsButton);
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -814,14 +814,15 @@ void AddPrivacyButton(
|
||||||
rpl::producer<QString> label,
|
rpl::producer<QString> label,
|
||||||
IconDescriptor &&descriptor,
|
IconDescriptor &&descriptor,
|
||||||
Privacy::Key key,
|
Privacy::Key key,
|
||||||
Fn<std::unique_ptr<EditPrivacyController>()> controllerFactory) {
|
Fn<std::unique_ptr<EditPrivacyController>()> controllerFactory,
|
||||||
|
const style::SettingsButton *stOverride) {
|
||||||
const auto shower = Ui::CreateChild<rpl::lifetime>(container.get());
|
const auto shower = Ui::CreateChild<rpl::lifetime>(container.get());
|
||||||
const auto session = &controller->session();
|
const auto session = &controller->session();
|
||||||
AddButtonWithLabel(
|
AddButtonWithLabel(
|
||||||
container,
|
container,
|
||||||
std::move(label),
|
std::move(label),
|
||||||
PrivacyString(session, key),
|
PrivacyString(session, key),
|
||||||
st::settingsButtonNoIcon,
|
stOverride ? *stOverride : st::settingsButtonNoIcon,
|
||||||
std::move(descriptor)
|
std::move(descriptor)
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
*shower = session->api().userPrivacy().value(
|
*shower = session->api().userPrivacy().value(
|
||||||
|
|
|
@ -32,7 +32,8 @@ void AddPrivacyButton(
|
||||||
rpl::producer<QString> label,
|
rpl::producer<QString> label,
|
||||||
IconDescriptor &&descriptor,
|
IconDescriptor &&descriptor,
|
||||||
Api::UserPrivacy::Key key,
|
Api::UserPrivacy::Key key,
|
||||||
Fn<std::unique_ptr<EditPrivacyController>()> controllerFactory);
|
Fn<std::unique_ptr<EditPrivacyController>()> controllerFactory,
|
||||||
|
const style::SettingsButton *stOverride = nullptr);
|
||||||
|
|
||||||
class PrivacySecurity : public Section<PrivacySecurity> {
|
class PrivacySecurity : public Section<PrivacySecurity> {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Reference in a new issue