mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +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(),
|
||||
{ &st::settingsIconArrows, kIconLightBlue },
|
||||
UserPrivacy::Key::CallsPeer2Peer,
|
||||
[] { return std::make_unique<CallsPeer2PeerPrivacyController>(); });
|
||||
[] { return std::make_unique<CallsPeer2PeerPrivacyController>(); },
|
||||
&st::settingsButton);
|
||||
AddSkip(content);
|
||||
|
||||
return result;
|
||||
|
|
|
@ -814,14 +814,15 @@ void AddPrivacyButton(
|
|||
rpl::producer<QString> label,
|
||||
IconDescriptor &&descriptor,
|
||||
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 session = &controller->session();
|
||||
AddButtonWithLabel(
|
||||
container,
|
||||
std::move(label),
|
||||
PrivacyString(session, key),
|
||||
st::settingsButtonNoIcon,
|
||||
stOverride ? *stOverride : st::settingsButtonNoIcon,
|
||||
std::move(descriptor)
|
||||
)->addClickHandler([=] {
|
||||
*shower = session->api().userPrivacy().value(
|
||||
|
|
|
@ -32,7 +32,8 @@ void AddPrivacyButton(
|
|||
rpl::producer<QString> label,
|
||||
IconDescriptor &&descriptor,
|
||||
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> {
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue