Skip to content

Commit 36dea0f

Browse files
committed
refactor(content_management): emit updated headline object on success
1 parent 1707271 commit 36dea0f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/content_management/bloc/edit_headline/edit_headline_bloc.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,16 @@ class EditHeadlineBloc extends Bloc<EditHeadlineEvent, EditHeadlineState> {
192192
source: state.source,
193193
category: state.category,
194194
status: state.contentStatus,
195+
updatedAt: DateTime.now(),
195196
);
196197

197198
await _headlinesRepository.update(id: _headlineId, item: updatedHeadline);
198-
emit(state.copyWith(status: EditHeadlineStatus.success));
199+
emit(
200+
state.copyWith(
201+
status: EditHeadlineStatus.success,
202+
updatedHeadline: updatedHeadline,
203+
),
204+
);
199205
} on HtHttpException catch (e) {
200206
emit(
201207
state.copyWith(

0 commit comments

Comments
 (0)