2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Copy t.me/+phonenumber link from Phone Number Privacy.

This commit is contained in:
John Preston
2022-03-01 15:30:55 +03:00
parent bea2cfd363
commit 616d099c07
5 changed files with 83 additions and 28 deletions

View File

@@ -57,11 +57,15 @@ public:
using Option = EditPrivacyBox::Option;
using Exception = EditPrivacyBox::Exception;
explicit PhoneNumberPrivacyController(
not_null<Window::SessionController*> controller);
Key key() override;
rpl::producer<QString> title() override;
rpl::producer<QString> optionsTitleKey() override;
rpl::producer<QString> warning() override;
rpl::producer<TextWithEntities> warning() override;
void prepareWarningLabel(not_null<Ui::FlatLabel*> warning) override;
rpl::producer<QString> exceptionButtonTextKey(
Exception exception) override;
rpl::producer<QString> exceptionBoxTitle(Exception exception) override;
@@ -75,6 +79,7 @@ public:
void saveAdditional() override;
private:
const not_null<Window::SessionController*> _controller;
rpl::variable<Option> _phoneNumberOption = { Option::Contacts };
rpl::variable<Option> _addedByPhone = { Option::Everyone };
Fn<void()> _saveAdditional;
@@ -92,7 +97,7 @@ public:
rpl::producer<QString> title() override;
rpl::producer<QString> optionsTitleKey() override;
rpl::producer<QString> warning() override;
rpl::producer<TextWithEntities> warning() override;
rpl::producer<QString> exceptionButtonTextKey(
Exception exception) override;
rpl::producer<QString> exceptionBoxTitle(Exception exception) override;
@@ -154,7 +159,7 @@ public:
rpl::producer<QString> title() override;
rpl::producer<QString> optionsTitleKey() override;
QString optionLabel(EditPrivacyBox::Option option) override;
rpl::producer<QString> warning() override;
rpl::producer<TextWithEntities> warning() override;
rpl::producer<QString> exceptionButtonTextKey(
Exception exception) override;
rpl::producer<QString> exceptionBoxTitle(Exception exception) override;
@@ -176,7 +181,7 @@ public:
rpl::producer<QString> title() override;
rpl::producer<QString> optionsTitleKey() override;
rpl::producer<QString> warning() override;
rpl::producer<TextWithEntities> warning() override;
rpl::producer<QString> exceptionButtonTextKey(
Exception exception) override;
rpl::producer<QString> exceptionBoxTitle(Exception exception) override;