diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index ab9a290fef..ff4ed33553 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -523,6 +523,8 @@ PRIVATE data/components/gift_auctions.h data/components/location_pickers.cpp data/components/location_pickers.h + data/components/passkeys.cpp + data/components/passkeys.h data/components/promo_suggestions.cpp data/components/promo_suggestions.h data/components/recent_peers.cpp diff --git a/Telegram/SourceFiles/data/components/passkeys.cpp b/Telegram/SourceFiles/data/components/passkeys.cpp new file mode 100644 index 0000000000..e42cd56032 --- /dev/null +++ b/Telegram/SourceFiles/data/components/passkeys.cpp @@ -0,0 +1,20 @@ +/* +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 +*/ +#include "data/components/passkeys.h" + +#include "main/main_session.h" + +namespace Data { + +Passkeys::Passkeys(not_null session) +: _session(session) { +} + +Passkeys::~Passkeys() = default; + +} // namespace Data diff --git a/Telegram/SourceFiles/data/components/passkeys.h b/Telegram/SourceFiles/data/components/passkeys.h new file mode 100644 index 0000000000..fcec1e518d --- /dev/null +++ b/Telegram/SourceFiles/data/components/passkeys.h @@ -0,0 +1,26 @@ +/* +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 + +namespace Main { +class Session; +} // namespace Main + +namespace Data { + +class Passkeys final { +public: + explicit Passkeys(not_null session); + ~Passkeys(); + +private: + const not_null _session; + +}; + +} // namespace Data diff --git a/Telegram/SourceFiles/main/main_session.cpp b/Telegram/SourceFiles/main/main_session.cpp index 1d869150d5..2a3d87f433 100644 --- a/Telegram/SourceFiles/main/main_session.cpp +++ b/Telegram/SourceFiles/main/main_session.cpp @@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "data/components/factchecks.h" #include "data/components/gift_auctions.h" #include "data/components/location_pickers.h" +#include "data/components/passkeys.h" #include "data/components/promo_suggestions.h" #include "data/components/recent_peers.h" #include "data/components/recent_shared_media_gifts.h" @@ -155,6 +156,7 @@ Session::Session( } } })) +, _passkeys(std::make_unique(this)) , _cachedReactionIconFactory(std::make_unique()) , _supportHelper(Support::Helper::Create(this)) , _fastButtonsBots(std::make_unique(this)) diff --git a/Telegram/SourceFiles/main/main_session.h b/Telegram/SourceFiles/main/main_session.h index 3ddfbef690..c6813fa2b4 100644 --- a/Telegram/SourceFiles/main/main_session.h +++ b/Telegram/SourceFiles/main/main_session.h @@ -42,6 +42,7 @@ class Factchecks; class LocationPickers; class Credits; class PromoSuggestions; +class Passkeys; } // namespace Data namespace HistoryView::Reactions { @@ -201,6 +202,9 @@ public: [[nodiscard]] Data::PromoSuggestions &promoSuggestions() const { return *_promoSuggestions; } + [[nodiscard]] Data::Passkeys &passkeys() const { + return *_passkeys; + } [[nodiscard]] auto cachedReactionIconFactory() const -> HistoryView::Reactions::CachedIconFactory & { return *_cachedReactionIconFactory; @@ -305,6 +309,7 @@ private: const std::unique_ptr _locationPickers; const std::unique_ptr _credits; const std::unique_ptr _promoSuggestions; + const std::unique_ptr _passkeys; using ReactionIconFactory = HistoryView::Reactions::CachedIconFactory; const std::unique_ptr _cachedReactionIconFactory;