2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-24 19:27:17 +00:00
tdesktop/Telegram/SourceFiles/settings/settings_information.h

62 lines
1.4 KiB
C
Raw Normal View History

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
#include "settings/settings_common.h"
2022-03-15 15:12:49 +04:00
namespace Dialogs::Ui {
2022-08-09 14:12:19 +03:00
using namespace ::Ui;
2022-03-15 15:12:49 +04:00
struct UnreadBadgeStyle;
} // namespace Dialogs::Ui
namespace Main {
class Account;
} // namespace Main
2018-09-05 22:05:49 +03:00
namespace Settings {
class Information : public Section<Information> {
2018-09-05 22:05:49 +03:00
public:
2018-09-13 23:09:26 +03:00
Information(
QWidget *parent,
2019-07-24 16:00:30 +02:00
not_null<Window::SessionController*> controller);
2018-09-05 22:05:49 +03:00
[[nodiscard]] rpl::producer<QString> title() override;
2018-09-05 22:05:49 +03:00
private:
void setupContent(not_null<Window::SessionController*> controller);
2018-09-05 22:05:49 +03:00
};
2022-03-15 15:12:49 +04: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 15:12:49 +04: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 15:12:49 +04:00
not_null<Ui::SettingsButton*> button,
rpl::producer<UnreadBadge> value);
} // namespace Badge
2018-09-05 22:05:49 +03:00
} // namespace Settings