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

Use Controller::account in MainWindow.

This commit is contained in:
John Preston
2019-06-06 14:59:00 +03:00
parent 1e861f79f0
commit 0868a9f7b9
14 changed files with 84 additions and 54 deletions

View File

@@ -13,6 +13,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
class BoxContent;
namespace Main {
class Account;
} // namespace Main
namespace Window {
class Controller;
@@ -22,7 +26,7 @@ struct TermsLock;
QImage LoadLogo();
QImage LoadLogoNoMargin();
QIcon CreateIcon();
QIcon CreateIcon(Main::Account *account = nullptr);
void ConvertIconToBlack(QImage &image);
class MainWindow : public Ui::RpWidget, protected base::Subscriber {
@@ -31,9 +35,10 @@ class MainWindow : public Ui::RpWidget, protected base::Subscriber {
public:
explicit MainWindow(not_null<Controller*> controller);
not_null<Window::Controller*> controller() const {
return _controller;
Window::Controller &controller() const {
return *_controller;
}
Main::Account &account() const;
Window::SessionController *sessionController() const;
void setInactivePress(bool inactive);
bool wasInactivePress() const {