added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry

This commit is contained in:
2026-07-06 15:43:17 +02:00
parent 614ab159af
commit 124b1a5177
34 changed files with 1866 additions and 409 deletions
@@ -35,10 +35,24 @@ abstract class LoadableHydratedBloc<
lastFetch: state.lastFetch,
reFetch: retry,
error: state.error,
statusText: state.statusText,
),
);
});
on<LoadingStatus<TState>>(
(event, emit) => emit(
LoadableState(
isLoading: state.isLoading,
data: innerState,
lastFetch: state.lastFetch,
reFetch: state.reFetch,
error: state.error,
statusText: event.statusText,
),
),
);
on<DataGathered<TState>>(
(event, emit) => emit(
LoadableState(
@@ -19,4 +19,12 @@ class Error<TState> extends LoadableHydratedBlocEvent<TState> {
class RefetchStarted<TState> extends LoadableHydratedBlocEvent<TState> {}
/// Sets the state's `statusText` — a transient progress note under the
/// primary loading spinner (e.g. "Erneuter Versuch (2 von 3) …"). Cleared
/// automatically by [DataGathered], [Error], [RefetchStarted] and [Reset].
class LoadingStatus<TState> extends LoadableHydratedBlocEvent<TState> {
final String? statusText;
LoadingStatus(this.statusText);
}
class Reset<TState> extends LoadableHydratedBlocEvent<TState> {}