2022-05-01 18:08:16 +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
|
|
|
|
|
2023-11-14 21:54:32 +00:00
|
|
|
#include "settings/settings_common_session.h"
|
2022-05-01 18:08:16 +00:00
|
|
|
|
2022-08-02 09:38:28 +00:00
|
|
|
namespace Ui {
|
|
|
|
class VerticalLayout;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2022-05-01 18:08:16 +00:00
|
|
|
namespace Window {
|
|
|
|
class Controller;
|
|
|
|
} // namespace Window
|
|
|
|
|
|
|
|
namespace Settings {
|
|
|
|
|
|
|
|
class Blocked : public Section<Blocked> {
|
|
|
|
public:
|
|
|
|
Blocked(
|
|
|
|
QWidget *parent,
|
|
|
|
not_null<Window::SessionController*> controller);
|
|
|
|
|
|
|
|
void showFinished() override;
|
|
|
|
|
|
|
|
[[nodiscard]] rpl::producer<QString> title() override;
|
|
|
|
|
|
|
|
[[nodiscard]] QPointer<Ui::RpWidget> createPinnedToTop(
|
|
|
|
not_null<QWidget*> parent) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setupContent();
|
|
|
|
void checkTotal(int total);
|
|
|
|
|
2022-08-02 09:38:28 +00:00
|
|
|
void visibleTopBottomUpdated(int visibleTop, int visibleBottom) override;
|
|
|
|
|
2022-05-01 18:08:16 +00:00
|
|
|
const not_null<Window::SessionController*> _controller;
|
2022-08-02 09:38:28 +00:00
|
|
|
const not_null<Ui::VerticalLayout*> _container;
|
2022-05-01 18:08:16 +00:00
|
|
|
|
|
|
|
base::unique_qptr<Ui::RpWidget> _loading;
|
|
|
|
|
|
|
|
rpl::variable<int> _countBlocked;
|
|
|
|
|
|
|
|
rpl::event_stream<> _showFinished;
|
|
|
|
rpl::event_stream<bool> _emptinessChanges;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Settings
|