From 8c6e72b21aba392c58b7b0a673461e840a4d15dd Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 25 Mar 2019 11:11:13 +0400 Subject: [PATCH] Hide Nobody option from profile photo privacy. --- .../SourceFiles/settings/settings_privacy_controllers.cpp | 4 ++++ Telegram/SourceFiles/settings/settings_privacy_controllers.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp b/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp index ff2a8b4d5..a5cd2d118 100644 --- a/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp +++ b/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp @@ -722,6 +722,10 @@ QString ProfilePhotoPrivacyController::title() { return lang(lng_edit_privacy_profile_photo_title); } +bool ProfilePhotoPrivacyController::hasOption(Option option) { + return (option != Option::Nobody); +} + LangKey ProfilePhotoPrivacyController::optionsTitleKey() { return lng_edit_privacy_profile_photo_header; } diff --git a/Telegram/SourceFiles/settings/settings_privacy_controllers.h b/Telegram/SourceFiles/settings/settings_privacy_controllers.h index 0990cdedc..5013cd51d 100644 --- a/Telegram/SourceFiles/settings/settings_privacy_controllers.h +++ b/Telegram/SourceFiles/settings/settings_privacy_controllers.h @@ -159,6 +159,7 @@ public: MTPInputPrivacyKey apiKey() override; QString title() override; + bool hasOption(Option option) override; LangKey optionsTitleKey() override; LangKey exceptionButtonTextKey(Exception exception) override; QString exceptionBoxTitle(Exception exception) override;