Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 1aa784b

Browse files
committed
minor-improvement
1 parent 412dfb1 commit 1aa784b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/lib/ui/flow/clean_up/clean_up_state_notifier.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ class CleanUpStateNotifier extends StateNotifier<CleanUpState> {
7474
}
7575
state = state.copyWith(
7676
deleteSelectedLoading: [],
77-
medias:
78-
state.medias.where((e) => !deleteMedias.contains(e.id)).toList(),
77+
medias: state.medias.where((e) => !res.contains(e.id)).toList(),
7978
);
8079
} catch (e, s) {
8180
state = state.copyWith(deleteSelectedLoading: [], actionError: e);
@@ -99,7 +98,7 @@ class CleanUpStateNotifier extends StateNotifier<CleanUpState> {
9998
state = state.copyWith(
10099
deleteAllLoading: false,
101100
selected: [],
102-
medias: [],
101+
medias: res.isNotEmpty ? [] : state.medias,
103102
);
104103
} catch (e, s) {
105104
state = state.copyWith(deleteAllLoading: false, actionError: e);

0 commit comments

Comments
 (0)