Skip to content

Commit 673d45b

Browse files
committed
refactor(content_management): simplify country change handling
- Remove unnecessary adaptation of package country to core country - Directly update state with the new country value
1 parent 0dd71a8 commit 673d45b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/content_management/bloc/create_headline/create_headline_bloc.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,7 @@ class CreateHeadlineBloc
134134
CreateHeadlineCountryChanged event,
135135
Emitter<CreateHeadlineState> emit,
136136
) {
137-
final packageCountry = event.country;
138-
if (packageCountry == null) {
139-
emit(state.copyWith(eventCountry: () => null));
140-
} else {
141-
final coreCountry = adaptPackageCountryToCoreCountry(packageCountry);
142-
emit(state.copyWith(eventCountry: () => coreCountry));
143-
}
137+
emit(state.copyWith(eventCountry: () => event.country));
144138
}
145139

146140
void _onStatusChanged(

0 commit comments

Comments
 (0)