fix(catalog): check auto-load also on size changes

Refs #3

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
cschlaefke 2026-11-04 01:18:23 +01:00
parent 0775152870
commit 28404edd10

View file

@ -245,12 +245,14 @@ class _CatalogSearchViewState extends ConsumerState<CatalogSearchView> {
);
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);