2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Wrap AuthSession in a new Main::Account object.

This commit is contained in:
John Preston
2019-04-30 15:12:30 +04:00
parent 8c67a4b991
commit bd2e1ceb02
5 changed files with 86 additions and 2 deletions

View File

@@ -34,6 +34,10 @@ namespace App {
void quit();
} // namespace App
namespace Main {
class Account;
} // namespace Main
namespace Ui {
namespace Animations {
class Manager;
@@ -143,11 +147,16 @@ public:
void configUpdated();
[[nodiscard]] rpl::producer<> configUpdates() const;
// Databases
// Databases.
Storage::Databases &databases() {
return *_databases;
}
// Account component.
Main::Account &activeAccount() {
return *_account;
}
// AuthSession component.
AuthSession *authSession() {
return _authSession.get();
@@ -269,6 +278,7 @@ private:
const std::unique_ptr<Storage::Databases> _databases;
const std::unique_ptr<Ui::Animations::Manager> _animationsManager;
const std::unique_ptr<Main::Account> _account;
std::unique_ptr<MainWindow> _window;
std::unique_ptr<Media::View::OverlayWidget> _mediaView;
const std::unique_ptr<Lang::Instance> _langpack;