fix: use ref.watch for hiddenDownloadIds reactivity

Show All Downloads button now updates immediately without restart
This commit is contained in:
zarzet
2026-01-18 13:12:05 +07:00
parent bf2fc7702b
commit a1647a41ff
+2 -2
View File
@@ -701,8 +701,8 @@ class _HomeTabState extends ConsumerState<HomeTab> with AutomaticKeepAliveClient
// Sort by most recent and take top 10
downloadItems.sort((a, b) => b.accessedAt.compareTo(a.accessedAt));
// Filter out hidden downloads
final hiddenIds = ref.read(recentAccessProvider).hiddenDownloadIds;
// Filter out hidden downloads (use ref.watch for reactivity)
final hiddenIds = ref.watch(recentAccessProvider.select((s) => s.hiddenDownloadIds));
final visibleDownloads = downloadItems
.where((item) => !hiddenIds.contains(item.id))
.take(10)