perf: optimize cache cleanup and reduce unnecessary widget rebuilds

This commit is contained in:
zarzet committed 2026-01-31 14:29:14 +07:00
1 parent 24c2fd6a15
commit 99281df5fb
3 files changed
+62 -14

No files matched your search

+2 -1
View File
@@ -43,6 +43,8 @@ class _EagerInitializationState extends ConsumerState<_EagerInitialization> {
void initState() {
super.initState();
_initializeExtensions();
// Trigger history provider initialization without subscribing to updates.
ref.read(downloadHistoryProvider);
}
Future<void> _initializeExtensions() async {
@@ -62,7 +64,6 @@ class _EagerInitializationState extends ConsumerState<_EagerInitialization> {
@override
Widget build(BuildContext context) {
ref.watch(downloadHistoryProvider);
return widget.child;
}
}