Skip to content

Commit f434e85

Browse files
authored
fix(mobile): getAllByRemoteId return all assets on empty arguments value (#17263)
* chore: post release tasks * fix(mobile): getAllByRemoteId return all assets if ids is empty
1 parent 3e03c47 commit f434e85

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mobile/lib/repositories/asset.repository.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,13 @@ class AssetRepository extends DatabaseRepository implements IAssetRepository {
7171
Future<List<Asset>> getAllByRemoteId(
7272
Iterable<String> ids, {
7373
AssetState? state,
74-
}) =>
75-
_getAllByRemoteIdImpl(ids, state).findAll();
74+
}) async {
75+
if (ids.isEmpty) {
76+
return [];
77+
}
78+
79+
return _getAllByRemoteIdImpl(ids, state).findAll();
80+
}
7681

7782
QueryBuilder<Asset, Asset, QAfterFilterCondition> _getAllByRemoteIdImpl(
7883
Iterable<String> ids,

0 commit comments

Comments
 (0)