TF-2931 Filter empty name identies

This commit is contained in:
DatDang
2024-08-15 15:31:20 +07:00
committed by Dat H. Pham
parent fcdaef80a2
commit 2de0734b17
2 changed files with 58 additions and 1 deletions
@@ -26,7 +26,11 @@ class GetAllIdentitiesInteractor {
if (sortOrderIsSupported && identitiesResponse.identities != null) {
_identityUtils.sortListIdentities(identitiesResponse.identities!);
}
yield Right(GetAllIdentitiesSuccess(identitiesResponse.identities, identitiesResponse.state));
yield Right(GetAllIdentitiesSuccess(
identitiesResponse.identities
?.where((identity) => identity.name?.trim().isNotEmpty == true)
.toList(),
identitiesResponse.state));
} catch (exception) {
yield Left(GetAllIdentitiesFailure(exception));
}