From da566d3d0bc40a1b38bc5c0398cfc28989589ac6 Mon Sep 17 00:00:00 2001 From: NBA2K1 <78034913+NBA2K1@users.noreply.github.com> Date: Sun, 28 Dec 2025 23:16:29 +0100 Subject: [PATCH] remove hideItems parameter No need to pass hideItems down, they all can use the top hideItems variable. It's never changed. --- lib/modules/updates/updates_screen.dart | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/modules/updates/updates_screen.dart b/lib/modules/updates/updates_screen.dart index d79e18f2..d133d062 100644 --- a/lib/modules/updates/updates_screen.dart +++ b/lib/modules/updates/updates_screen.dart @@ -167,7 +167,7 @@ class _UpdatesScreenState extends ConsumerState TextButton( onPressed: () async { if (mounted) Navigator.pop(context); - await _clearUpdates(hideItems); + await _clearUpdates(); }, child: Text(l10n.ok), ), @@ -247,14 +247,11 @@ class _UpdatesScreenState extends ConsumerState ); } - Future _clearUpdates(List hideItems) async { + Future _clearUpdates() async { List updates = await isar.updates .filter() .idIsNotNull() - .chapter( - (q) => - q.manga((q) => q.itemTypeEqualTo(getCurrentItemType(hideItems))), - ) + .chapter((q) => q.manga((q) => q.itemTypeEqualTo(getCurrentItemType()))) .findAll(); final idsToDelete = []; isar.writeTxnSync(() { @@ -268,7 +265,7 @@ class _UpdatesScreenState extends ConsumerState await isar.writeTxn(() => isar.updates.deleteAll(idsToDelete)); } - ItemType getCurrentItemType(List hideItems) { + ItemType getCurrentItemType() { return _tabBarController.index == 0 && !hideItems.contains("/MangaLibrary") ? ItemType.manga : _tabBarController.index ==