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:
parent
0775152870
commit
28404edd10
1 changed files with 5 additions and 3 deletions
|
|
@ -245,12 +245,14 @@ class _CatalogSearchViewState extends ConsumerState<CatalogSearchView> {
|
||||||
);
|
);
|
||||||
final state = ref.watch(catalogSearchControllerProvider);
|
final state = ref.watch(catalogSearchControllerProvider);
|
||||||
_scheduleFocus(state);
|
_scheduleFocus(state);
|
||||||
if (state.status == CatalogSearchStatus.data) {
|
|
||||||
_scheduleAutoLoadCheck();
|
|
||||||
}
|
|
||||||
|
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
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 width = constraints.maxWidth;
|
||||||
final expanded = AppWidthClass.of(width) == AppWidthClass.expanded;
|
final expanded = AppWidthClass.of(width) == AppWidthClass.expanded;
|
||||||
final padding = AppSpacing.pagePadding(width);
|
final padding = AppSpacing.pagePadding(width);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue