Optimize startup flow and split zh-Hans font packs

This commit is contained in:
liu weikai
2026-04-21 10:20:01 +08:00
parent cd045e5935
commit 063f0960e5
59 changed files with 2741 additions and 568 deletions
+11 -1
View File
@@ -1,5 +1,6 @@
#include "ui/startup_ui_shell.h"
#include "lvgl.h"
#include "ui/app_runtime.h"
#include "ui/localization.h"
#include "ui/menu/menu_layout.h"
@@ -12,6 +13,12 @@ namespace
bool s_shell_initialized = false;
void present_boot_overlay_now()
{
lv_timer_handler();
lv_refr_now(nullptr);
}
bool lock_ui(const Hooks& hooks)
{
return hooks.lock_ui ? hooks.lock_ui(hooks.lock_timeout_ms) : true;
@@ -29,9 +36,9 @@ void unlock_ui(const Hooks& hooks)
bool prepareBootUi(const Hooks& hooks, bool waking_from_sleep)
{
::ui::i18n::reload_language();
if (waking_from_sleep)
{
::ui::i18n::reload_language();
return true;
}
if (!lock_ui(hooks))
@@ -39,7 +46,10 @@ bool prepareBootUi(const Hooks& hooks, bool waking_from_sleep)
return false;
}
ui::boot::show();
ui::boot::set_log_line("Loading language packs...");
present_boot_overlay_now();
unlock_ui(hooks);
::ui::i18n::reload_language();
return true;
}