2018-09-05 22:05:49 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-15 00:54:32 +03:00
|
|
|
#include "settings/settings_common_session.h"
|
2021-07-31 17:11:53 +03:00
|
|
|
#include "api/api_user_privacy.h"
|
2019-05-21 14:51:24 +02:00
|
|
|
|
|
|
|
class EditPrivacyController;
|
2019-09-18 14:19:05 +03:00
|
|
|
|
|
|
|
namespace Ui {
|
2019-09-13 09:06:02 +03:00
|
|
|
class BoxContent;
|
2019-09-18 14:19:05 +03:00
|
|
|
} // namespace Ui
|
2018-09-05 22:05:49 +03:00
|
|
|
|
|
|
|
namespace Settings {
|
|
|
|
|
2024-08-14 15:17:59 +02:00
|
|
|
void SetupSensitiveContent(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
rpl::producer<> updateTrigger);
|
|
|
|
|
2019-05-20 20:40:53 +02:00
|
|
|
int ExceptionUsersCount(const std::vector<not_null<PeerData*>> &exceptions);
|
|
|
|
|
2019-07-24 16:00:30 +02:00
|
|
|
bool CheckEditCloudPassword(not_null<::Main::Session*> session);
|
2019-09-18 14:19:05 +03:00
|
|
|
object_ptr<Ui::BoxContent> EditCloudPasswordBox(
|
2019-07-24 13:45:24 +02:00
|
|
|
not_null<::Main::Session*> session);
|
2021-06-13 10:37:52 +03:00
|
|
|
void RemoveCloudPassword(not_null<Window::SessionController*> session);
|
2019-09-18 14:19:05 +03:00
|
|
|
object_ptr<Ui::BoxContent> CloudPasswordAppOutdatedBox();
|
2019-06-14 14:01:35 +02:00
|
|
|
|
2024-03-07 19:07:05 +03:00
|
|
|
not_null<Ui::SettingsButton*> AddPrivacyButton(
|
2019-07-24 16:00:30 +02:00
|
|
|
not_null<Window::SessionController*> controller,
|
2019-05-21 14:51:24 +02:00
|
|
|
not_null<Ui::VerticalLayout*> container,
|
2019-06-18 14:16:43 +02:00
|
|
|
rpl::producer<QString> label,
|
2022-02-13 16:30:43 +03:00
|
|
|
IconDescriptor &&descriptor,
|
2021-07-31 17:11:53 +03:00
|
|
|
Api::UserPrivacy::Key key,
|
2023-07-18 22:38:28 +04:00
|
|
|
Fn<std::unique_ptr<EditPrivacyController>()> controllerFactory,
|
|
|
|
const style::SettingsButton *stOverride = nullptr);
|
2019-05-21 14:51:24 +02:00
|
|
|
|
2023-08-11 16:20:38 +02:00
|
|
|
void SetupArchiveAndMute(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
not_null<Ui::VerticalLayout*> container);
|
|
|
|
|
2022-04-01 15:53:23 +04:00
|
|
|
class PrivacySecurity : public Section<PrivacySecurity> {
|
2018-09-05 22:05:49 +03:00
|
|
|
public:
|
2019-07-24 16:00:30 +02:00
|
|
|
PrivacySecurity(
|
|
|
|
QWidget *parent,
|
|
|
|
not_null<Window::SessionController*> controller);
|
2018-09-05 22:05:49 +03:00
|
|
|
|
2022-04-13 12:05:10 +04:00
|
|
|
[[nodiscard]] rpl::producer<QString> title() override;
|
2022-04-01 15:53:23 +04:00
|
|
|
|
2018-09-05 22:05:49 +03:00
|
|
|
private:
|
2019-07-24 16:00:30 +02:00
|
|
|
void setupContent(not_null<Window::SessionController*> controller);
|
2018-09-05 22:05:49 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Settings
|