2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Update API scheme to layer 160.

This commit is contained in:
John Preston
2023-05-01 10:44:57 +04:00
parent 918af601cf
commit 429a3da3e5
11 changed files with 83 additions and 21 deletions

View File

@@ -116,6 +116,8 @@ QString EditPrivacyController::optionLabel(Option option) const {
switch (option) {
case Option::Everyone: return tr::lng_edit_privacy_everyone(tr::now);
case Option::Contacts: return tr::lng_edit_privacy_contacts(tr::now);
case Option::CloseFriends:
return tr::lng_edit_privacy_close_friends(tr::now);
case Option::Nobody: return tr::lng_edit_privacy_nobody(tr::now);
}
Unexpected("Option value in optionsLabelKey.");
@@ -182,10 +184,12 @@ bool EditPrivacyBox::showExceptionLink(Exception exception) const {
switch (exception) {
case Exception::Always:
return (_value.option == Option::Contacts)
|| (_value.option == Option::CloseFriends)
|| (_value.option == Option::Nobody);
case Exception::Never:
return (_value.option == Option::Everyone)
|| (_value.option == Option::Contacts);
|| (_value.option == Option::Contacts)
|| (_value.option == Option::CloseFriends);
}
Unexpected("Invalid exception value.");
}
@@ -326,6 +330,7 @@ void EditPrivacyBox::setupContent() {
{ 0, st::settingsPrivacySkipTop, 0, 0 });
addOptionRow(Option::Everyone);
addOptionRow(Option::Contacts);
addOptionRow(Option::CloseFriends);
addOptionRow(Option::Nobody);
const auto warning = addLabelOrDivider(
content,