fix: show only owned assets in places and map (#22585)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-10-02 21:11:14 +05:30
committed by GitHub
parent 950f268cb0
commit a2b25b7a74
6 changed files with 44 additions and 19 deletions
@@ -81,9 +81,11 @@ class RemoteAssetRepository extends DriftDatabaseRepository {
.getSingleOrNull();
}
Future<List<(String, String)>> getPlaces() {
Future<List<(String, String)>> getPlaces(String userId) {
final asset = Subquery(
_db.remoteAssetEntity.select()..orderBy([(row) => OrderingTerm.desc(row.createdAt)]),
_db.remoteAssetEntity.select()
..where((row) => row.ownerId.equals(userId))
..orderBy([(row) => OrderingTerm.desc(row.createdAt)]),
"asset",
);