Render startup immediately and defer native work with a smooth home transition
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user