2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move some calls from App namespace.

This commit is contained in:
John Preston
2019-01-18 16:27:37 +04:00
parent e7804d014d
commit 4111da1dd0
74 changed files with 896 additions and 852 deletions

View File

@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/flags.h"
#include "dialogs/dialogs_key.h"
class AuthSession;
class MainWidget;
class HistoryMessage;
class HistoryService;
@@ -103,6 +104,10 @@ class Controller;
class Navigation {
public:
explicit Navigation(not_null<AuthSession*> session);
AuthSession &session() const;
virtual void showSection(
SectionMemento &&memento,
const SectionShow &params = SectionShow()) = 0;
@@ -127,11 +132,16 @@ public:
virtual ~Navigation() = default;
private:
const not_null<AuthSession*> _session;
};
class Controller : public Navigation {
public:
Controller(not_null<MainWindow*> window);
Controller(
not_null<AuthSession*> session,
not_null<MainWindow*> window);
not_null<MainWindow*> window() const {
return _window;
@@ -260,6 +270,7 @@ public:
~Controller();
private:
void init();
void initSupportMode();
int minimalThreeColumnWidth() const;
@@ -278,7 +289,7 @@ private:
void pushToChatEntryHistory(Dialogs::RowDescriptor row);
bool chatEntryHistoryMove(int steps);
not_null<MainWindow*> _window;
const not_null<MainWindow*> _window;
std::unique_ptr<Passport::FormController> _passportForm;