mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Move ApiWrap to AuthSession.
Also send all ApiWrap requests as an MTP::Sender. Also create AuthSession only after starting MTProto.
This commit is contained in:
@@ -30,6 +30,8 @@ class System;
|
||||
} // namespace Notifications
|
||||
} // namespace Window
|
||||
|
||||
class ApiWrap;
|
||||
|
||||
enum class EmojiPanelTab {
|
||||
Emoji,
|
||||
Stickers,
|
||||
@@ -121,12 +123,17 @@ public:
|
||||
return _data;
|
||||
}
|
||||
|
||||
ApiWrap &api() {
|
||||
return *_api;
|
||||
}
|
||||
|
||||
~AuthSession();
|
||||
|
||||
private:
|
||||
UserId _userId = 0;
|
||||
const UserId _userId = 0;
|
||||
AuthSessionData _data;
|
||||
|
||||
const std::unique_ptr<ApiWrap> _api;
|
||||
const std::unique_ptr<Storage::Downloader> _downloader;
|
||||
const std::unique_ptr<Window::Notifications::System> _notifications;
|
||||
|
||||
|
Reference in New Issue
Block a user