Improve init. Close #236

This commit is contained in:
2025-03-04 15:30:40 +08:00
parent 0f6874f8d7
commit 7b5c13200d
14 changed files with 184 additions and 105 deletions

View File

@@ -77,10 +77,15 @@ class _App {
Future<void> init() async {
cachePath = (await getApplicationCacheDirectory()).path;
dataPath = (await getApplicationSupportDirectory()).path;
await data.init();
await history.init();
await favorites.init();
await local.init();
}
Future<void> initComponents() async {
await Future.wait([
data.init(),
history.init(),
favorites.init(),
local.init(),
]);
}
Function? _forceRebuildHandler;