fix(inventory): recover from a stuck loading spinner

The inventory stream subscription had no onError handler, so a transient
failure at startup (e.g. the encrypted DB not yet ready) went unhandled
and left loading=true forever — the spinner that only a restart cleared.

Handle stream errors: drop out of loading, surface an error state, and
offer a retry that re-opens the stream. Add a _LoadError view (i18n en/
es/ast/pt) and cover both the failure and the retry-recovers paths.
This commit is contained in:
vjrj 2026-07-10 22:12:24 +02:00
parent bb4ee2fd89
commit f45c452615
12 changed files with 158 additions and 17 deletions

View file

@ -455,6 +455,12 @@ class Translations$inventory$en {
/// en: 'To regrow'
String get needsReproductionFilter => 'To regrow';
/// en: 'Couldn't open your seed bank. It may just have been busy try again.'
String get loadError => 'Couldn\'t open your seed bank. It may just have been busy — try again.';
/// en: 'Try again'
String get retry => 'Try again';
}
// Path: draft
@ -2070,6 +2076,8 @@ extension on Translations {
'inventory.clearFilters' => 'Clear filters',
'inventory.uncategorized' => 'Uncategorized',
'inventory.needsReproductionFilter' => 'To regrow',
'inventory.loadError' => 'Couldn\'t open your seed bank. It may just have been busy — try again.',
'inventory.retry' => 'Try again',
'draft.capture' => 'Capture photos',
'draft.captured' => ({required Object n}) => '${n} captured to catalogue',
'draft.triageTitle' => 'To catalogue',