From 28404edd10d2cdcc1b46cde7311795e459ad252c Mon Sep 17 00:00:00 2001 From: cschlaefke Date: Wed, 4 Nov 2026 01:18:23 +0100 Subject: [PATCH] fix(catalog): check auto-load also on size changes Refs #3 Co-Authored-By: Claude Sonnet 5.5 --- .../catalog/presentation/search/catalog_search_view.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/lib/features/catalog/presentation/search/catalog_search_view.dart b/app/lib/features/catalog/presentation/search/catalog_search_view.dart index 4512c6d..c4a112e 100644 --- a/app/lib/features/catalog/presentation/search/catalog_search_view.dart +++ b/app/lib/features/catalog/presentation/search/catalog_search_view.dart @@ -245,12 +245,14 @@ class _CatalogSearchViewState extends ConsumerState { ); final state = ref.watch(catalogSearchControllerProvider); _scheduleFocus(state); - if (state.status == CatalogSearchStatus.data) { - _scheduleAutoLoadCheck(); - } return LayoutBuilder( builder: (context, constraints) { + // Also on a size change (without a state change): a larger window + // may show the whole list, so no scroll event would ever come. + if (state.status == CatalogSearchStatus.data) { + _scheduleAutoLoadCheck(); + } final width = constraints.maxWidth; final expanded = AppWidthClass.of(width) == AppWidthClass.expanded; final padding = AppSpacing.pagePadding(width);