remove locked and favorite

This commit is contained in:
wuzihao051119 2025-07-16 22:00:25 +08:00 committed by mertalev
parent 3ec177f9e8
commit 2749204b4f
No known key found for this signature in database
GPG Key ID: DF6ABC77AAD98C95
2 changed files with 0 additions and 20 deletions

View File

@ -17,12 +17,6 @@ class MapFactory {
MapService remote(String ownerId) =>
MapService(_mapRepository.remote(ownerId));
MapService favorite(String ownerId) =>
MapService(_mapRepository.favorite(ownerId));
MapService locked(String ownerId) =>
MapService(_mapRepository.locked(ownerId));
}
class MapService {

View File

@ -20,20 +20,6 @@ class DriftMapRepository extends DriftDatabaseRepository {
row.ownerId.equals(ownerId),
);
MapQuery favorite(String ownerId) => _mapQueryBuilder(
assetFilter: (row) =>
row.deletedAt.isNull() &
row.isFavorite.equals(true) &
row.ownerId.equals(ownerId),
);
MapQuery locked(String userId) => _mapQueryBuilder(
assetFilter: (row) =>
row.deletedAt.isNull() &
row.visibility.equalsValue(AssetVisibility.locked) &
row.ownerId.equals(userId),
);
MapQuery _mapQueryBuilder({
Expression<bool> Function($RemoteAssetEntityTable row)? assetFilter,
Expression<bool> Function($RemoteExifEntityTable row)? exifFilter,