feat: show "appears in" albums on asset viewer bottom sheet
fix: multiple RemoteAlbumPages in navigation stack this also allows us to not have to set the current album before navigating to RemoteAlbumPage chore: clarification comments handle nested album pages fix: hide "appears in" when an asset is not in any albums fix: way more bottom padding for some reason we can't query the safe area here :/
This commit is contained in:
@@ -372,6 +372,18 @@ class DriftRemoteAlbumRepository extends DriftDatabaseRepository {
|
||||
|
||||
return query.map((row) => row.read(_db.remoteAssetEntity.id)!).get();
|
||||
}
|
||||
|
||||
Future<List<RemoteAlbum>> getAlbumsContainingAsset(String assetId) async {
|
||||
final albumIdsQuery = _db.remoteAlbumAssetEntity.select()..where((row) => row.assetId.equals(assetId));
|
||||
|
||||
final albumIds = (await albumIdsQuery.get()).map((e) => e.albumId).toSet();
|
||||
|
||||
if (albumIds.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return getAll().then((albums) => albums.where((album) => albumIds.contains(album.id)).toList());
|
||||
}
|
||||
}
|
||||
|
||||
extension on RemoteAlbumEntityData {
|
||||
|
||||
Reference in New Issue
Block a user