mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Use serverside keywords for emoji suggestions.
This commit is contained in:
@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "core/sandbox.h"
|
||||
#include "core/local_url_handlers.h"
|
||||
#include "core/launcher.h"
|
||||
#include "chat_helpers/emoji_keywords.h"
|
||||
#include "storage/localstorage.h"
|
||||
#include "platform/platform_specific.h"
|
||||
#include "mainwindow.h"
|
||||
@@ -83,6 +84,7 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
, _databases(std::make_unique<Storage::Databases>())
|
||||
, _animationsManager(std::make_unique<Ui::Animations::Manager>())
|
||||
, _langpack(std::make_unique<Lang::Instance>())
|
||||
, _emojiKeywords(std::make_unique<ChatHelpers::EmojiKeywords>())
|
||||
, _audio(std::make_unique<Media::Audio::Instance>())
|
||||
, _logo(Window::LoadLogo())
|
||||
, _logoNoMargin(Window::LoadLogoNoMargin()) {
|
||||
@@ -93,6 +95,41 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
Application::~Application() {
|
||||
_window.reset();
|
||||
_mediaView.reset();
|
||||
|
||||
// Some MTP requests can be cancelled from data clearing.
|
||||
authSessionDestroy();
|
||||
|
||||
// The langpack manager should be destroyed before MTProto instance,
|
||||
// because it is MTP::Sender and it may have pending requests.
|
||||
_langCloudManager.reset();
|
||||
|
||||
_mtproto.reset();
|
||||
_mtprotoForKeysDestroy.reset();
|
||||
|
||||
Shortcuts::Finish();
|
||||
|
||||
Ui::Emoji::Clear();
|
||||
|
||||
anim::stopManager();
|
||||
|
||||
stopWebLoadManager();
|
||||
App::deinitMedia();
|
||||
|
||||
Window::Theme::Unload();
|
||||
|
||||
Media::Player::finish(_audio.get());
|
||||
style::stopManager();
|
||||
|
||||
Local::finish();
|
||||
Global::finish();
|
||||
ThirdParty::finish();
|
||||
|
||||
Instance = nullptr;
|
||||
}
|
||||
|
||||
void Application::run() {
|
||||
Fonts::Start();
|
||||
|
||||
@@ -1127,41 +1164,6 @@ void Application::startShortcuts() {
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
Application::~Application() {
|
||||
_window.reset();
|
||||
_mediaView.reset();
|
||||
|
||||
// Some MTP requests can be cancelled from data clearing.
|
||||
authSessionDestroy();
|
||||
|
||||
// The langpack manager should be destroyed before MTProto instance,
|
||||
// because it is MTP::Sender and it may have pending requests.
|
||||
_langCloudManager.reset();
|
||||
|
||||
_mtproto.reset();
|
||||
_mtprotoForKeysDestroy.reset();
|
||||
|
||||
Shortcuts::Finish();
|
||||
|
||||
Ui::Emoji::Clear();
|
||||
|
||||
anim::stopManager();
|
||||
|
||||
stopWebLoadManager();
|
||||
App::deinitMedia();
|
||||
|
||||
Window::Theme::Unload();
|
||||
|
||||
Media::Player::finish(_audio.get());
|
||||
style::stopManager();
|
||||
|
||||
Local::finish();
|
||||
Global::finish();
|
||||
ThirdParty::finish();
|
||||
|
||||
Instance = nullptr;
|
||||
}
|
||||
|
||||
bool IsAppLaunched() {
|
||||
return (Application::Instance != nullptr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user