tdesktop/Telegram/SourceFiles/settings/settings_information.h

62 lines
1.4 KiB
C
Raw Normal View History

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
namespace Main {
class Account;
} // namespace Main
2018-09-05 19:05:49 +00:00
namespace Settings {
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
[[nodiscard]] rpl::producer<QString> title() override;
2018-09-05 19:05:49 +00:00
private:
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);
namespace Badge {
[[nodiscard]] Dialogs::Ui::UnreadBadgeStyle Style();
2022-03-15 11:12:49 +00:00
struct UnreadBadge {
int count = 0;
bool muted = false;
};
[[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);
} // namespace Badge
2018-09-05 19:05:49 +00:00
} // namespace Settings