Render startup immediately and defer native work with a smooth home transition

This commit is contained in:
Codex
2026-10-14 17:26:24 +08:00
parent bb7a7a2e58
commit ce21cdc10c
17 changed files with 641 additions and 144 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ class AppController extends ChangeNotifier {
lastError = null;
}
Future<void> initialize() => _run(() async {
Future<void> initialize({bool reconcileServices = true}) => _run(() async {
try {
snapshot = await store.load() ?? AppSnapshot();
storageReady = true;
@@ -65,7 +65,7 @@ class AppController extends ChangeNotifier {
storageReady = false;
throw const FormatException('保存文件读取失败,可恢复最近备份');
}
await _reconcile();
if (reconcileServices) await _reconcile();
});
Future<void> restoreBackup() => _run(() async {
snapshot = await store.restoreBackup();