TF-2302 Fix delete folder

Signed-off-by: dab246 <tdvu@linagora.com>

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit e5d455fd923053d1cd3793204130e6dd4423f5e0)
This commit is contained in:
dab246
2023-11-07 16:21:42 +07:00
committed by Dat Vu
parent f7ba168d7a
commit 0c46071bbf
3 changed files with 15 additions and 18 deletions
@@ -56,20 +56,20 @@ mixin HandleSetErrorMixin {
}
}
List<MapEntry<Id, SetError>> handleSetResponse(List<SetResponse?> listSetResponse) {
Map<Id, SetError> handleSetResponse(List<SetResponse?> listSetResponse) {
final listSetResponseNotNull = listSetResponse.whereNotNull().toList();
if (listSetResponseNotNull.isEmpty) {
return [];
return <Id, SetError>{};
}
final List<MapEntry<Id, SetError>> remainedErrors = [];
final Map<Id, SetError> remainedErrors = <Id, SetError>{};
for (var response in listSetResponseNotNull) {
handleSetErrors(
notDestroyedError: response.notDestroyed,
notUpdatedError: response.notUpdated,
notCreatedError: response.notCreated,
unCatchErrorHandler: (setErrorEntry) {
remainedErrors.add(setErrorEntry);
remainedErrors.addEntries({setErrorEntry});
return false;
}
);