Moved out Settings::Passkeys class from header.

This commit is contained in:
23rd
2025-11-29 05:33:50 +03:00
committed by John Preston
parent f20c5a1d3c
commit 8292334c9b
2 changed files with 24 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "settings/settings_passkeys.h"
#include "settings/settings_common_session.h"
#include "data/components/passkeys.h"
#include "data/data_session.h"
#include "window/window_session_controller.h"
@@ -29,6 +30,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Settings {
class Passkeys : public Section<Passkeys> {
public:
Passkeys(
QWidget *parent,
not_null<Window::SessionController*> controller);
[[nodiscard]] rpl::producer<QString> title() override;
private:
void setupContent(not_null<Window::SessionController*> controller);
};
void PasskeysNoneBox(
not_null<Ui::GenericBox*> box,
not_null<Main::Session*> session) {
@@ -176,4 +190,8 @@ void Passkeys::setupContent(
Ui::ResizeFitChild(this, content);
}
Type PasskeysId() {
return Passkeys::Id();
}
} // namespace Settings

View File

@@ -7,29 +7,22 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "settings/settings_common_session.h"
#include "settings/settings_type.h"
namespace Ui {
class GenericBox;
} // namespace Ui
namespace Main {
class Session;
} // namespace Main
namespace Settings {
void PasskeysNoneBox(
not_null<Ui::GenericBox*> box,
not_null<Main::Session*> session);
class Passkeys : public Section<Passkeys> {
public:
Passkeys(
QWidget *parent,
not_null<Window::SessionController*> controller);
[[nodiscard]] rpl::producer<QString> title() override;
private:
void setupContent(not_null<Window::SessionController*> controller);
};
Type PasskeysId();
} // namespace Settings