2018-09-05 19:05:49 +00: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
|
|
|
|
|
|
|
|
#include "settings/settings_common.h"
|
|
|
|
|
2022-03-15 11:12:49 +00:00
|
|
|
namespace Dialogs::Ui {
|
2022-08-09 11:12:19 +00:00
|
|
|
using namespace ::Ui;
|
2022-03-15 11:12:49 +00:00
|
|
|
struct UnreadBadgeStyle;
|
|
|
|
} // namespace Dialogs::Ui
|
|
|
|
|
2022-06-01 22:21:26 +00:00
|
|
|
namespace Main {
|
|
|
|
class Account;
|
|
|
|
} // namespace Main
|
|
|
|
|
2018-09-05 19:05:49 +00:00
|
|
|
namespace Settings {
|
|
|
|
|
2022-04-01 11:53:23 +00:00
|
|
|
class Information : public Section<Information> {
|
2018-09-05 19:05:49 +00:00
|
|
|
public:
|
2018-09-13 20:09:26 +00:00
|
|
|
Information(
|
|
|
|
QWidget *parent,
|
2019-07-24 14:00:30 +00:00
|
|
|
not_null<Window::SessionController*> controller);
|
2018-09-05 19:05:49 +00:00
|
|
|
|
2022-04-13 08:05:10 +00:00
|
|
|
[[nodiscard]] rpl::producer<QString> title() override;
|
2022-04-01 11:53:23 +00:00
|
|
|
|
2018-09-05 19:05:49 +00:00
|
|
|
private:
|
2019-06-06 10:21:40 +00:00
|
|
|
void setupContent(not_null<Window::SessionController*> controller);
|
2018-09-05 19:05:49 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-03-15 11:12:49 +00:00
|
|
|
struct AccountsEvents {
|
|
|
|
rpl::producer<> currentAccountActivations;
|
|
|
|
};
|
|
|
|
AccountsEvents SetupAccounts(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
not_null<Window::SessionController*> controller);
|
|
|
|
|
2022-06-13 22:43:13 +00:00
|
|
|
namespace Badge {
|
|
|
|
|
|
|
|
[[nodiscard]] Dialogs::Ui::UnreadBadgeStyle Style();
|
2022-03-15 11:12:49 +00:00
|
|
|
|
|
|
|
struct UnreadBadge {
|
|
|
|
int count = 0;
|
|
|
|
bool muted = false;
|
|
|
|
};
|
2022-06-13 22:43:13 +00:00
|
|
|
[[nodiscard]] not_null<Ui::RpWidget*> AddRight(
|
|
|
|
not_null<Ui::SettingsButton*> button);
|
|
|
|
[[nodiscard]] not_null<Ui::RpWidget*> CreateUnread(
|
|
|
|
not_null<Ui::RpWidget*> container,
|
|
|
|
rpl::producer<UnreadBadge> value);
|
|
|
|
void AddUnread(
|
2022-03-15 11:12:49 +00:00
|
|
|
not_null<Ui::SettingsButton*> button,
|
|
|
|
rpl::producer<UnreadBadge> value);
|
|
|
|
|
2022-06-13 22:43:13 +00:00
|
|
|
} // namespace Badge
|
2018-09-05 19:05:49 +00:00
|
|
|
} // namespace Settings
|