Skip to content

Commit 2fe7cf0

Browse files
committed
refactor(content_management): add case for DeletionStatus.requested in switch statement
- Add a case for DeletionStatus.requested in the switch statement - Include a comment explaining that this case is now handled by the optimistic UI update in specific delete handlers - Mention that the itemPendingDeletion is set in those handlers, which the UI uses to build the snackbar message
1 parent 2befa95 commit 2fe7cf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/content_management/bloc/content_management_bloc.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,12 @@ class ContentManagementBloc
800800
Emitter<ContentManagementState> emit,
801801
) async {
802802
switch (event.event.status) {
803+
case DeletionStatus.requested:
804+
// This case is now handled by the optimistic UI update in the
805+
// specific delete handlers (e.g., _onDeleteHeadlineForeverRequested).
806+
// The itemPendingDeletion is set there, which the UI uses to build
807+
// the snackbar message.
808+
break;
803809
case DeletionStatus.confirmed:
804810
// If deletion is confirmed, clear pending status.
805811
// The item was already optimistically removed from the list.

0 commit comments

Comments
 (0)