mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-05-19 22:33:54 +02:00
39 lines
No EOL
829 B
C++
39 lines
No EOL
829 B
C++
// This is the source code of AyuGram for Desktop.
|
|
//
|
|
// We do not and cannot prevent the use of our code,
|
|
// but be respectful and credit the original author.
|
|
//
|
|
// Copyright @Radolyn, 2023
|
|
#include "ayu_infra.h"
|
|
|
|
#include "ayu_lang.h"
|
|
#include "ayu/ayu_lottie.h"
|
|
#include "ayu/ui/ayu_lottie.h"
|
|
#include "lang/lang_instance.h"
|
|
|
|
namespace AyuInfra
|
|
{
|
|
|
|
void initLang()
|
|
{
|
|
QString langPackBaseId = Lang::GetInstance().baseId();
|
|
QString langPackId = Lang::GetInstance().id();
|
|
if (langPackId.isEmpty()) {
|
|
LOG(("Lang ID not found! Re-use old language pack..."));
|
|
return;
|
|
}
|
|
CustomLangPack::initInstance();
|
|
CustomLangPack::currentInstance()->fetchCustomLangPack(langPackId, langPackBaseId);
|
|
}
|
|
|
|
void initLottie() {
|
|
AyuUi::setLottieImpl(std::make_shared<AyuUi::AyuLottieImpl>());
|
|
}
|
|
|
|
void init()
|
|
{
|
|
initLang();
|
|
initLottie();
|
|
}
|
|
|
|
} |