Skip to content
This repository was archived by the owner on May 19, 2023. It is now read-only.

Commit 7f07309

Browse files
committed
Revert "filtered_*: initially empty list"
This reverts commit 84d2355.
1 parent 84d2355 commit 7f07309

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/blocs/filtered_casks/filtered_casks_bloc.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class FilteredCasksBloc extends Bloc<FilteredCasksEvent, FilteredCasksState> {
1616
FilteredCasksBloc({required this.bloc})
1717
: super(FilteredCasksState(
1818
filter: RegExp(''),
19-
casks: [],
19+
casks: bloc.state is CasksLoadedState
20+
? (bloc.state as CasksLoadedState).casks
21+
: [],
2022
)) {
2123
_subscription = bloc.stream.listen((state) {
2224
if (state is CasksLoadedState) {

lib/blocs/filtered_formulae/filtered_formulae_bloc.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class FilteredFormulaeBloc
1717
FilteredFormulaeBloc({required this.bloc})
1818
: super(FilteredFormulaeState(
1919
filter: RegExp(''),
20-
formulae: [],
20+
formulae: bloc.state is FormulaeLoadedState
21+
? (bloc.state as FormulaeLoadedState).formulae
22+
: [],
2123
)) {
2224
_subscription = bloc.stream.listen((state) {
2325
if (state is FormulaeLoadedState) {

0 commit comments

Comments
 (0)