mirror of
https://github.com/immich-app/immich.git
synced 2025-02-04 01:09:14 -05:00
Fix formatting.
This commit is contained in:
parent
979ce90abf
commit
3a92fa896e
1 changed files with 12 additions and 3 deletions
|
@ -34,15 +34,24 @@ class AlbumRepository extends DatabaseRepository implements IAlbumRepository {
|
||||||
Future<Album> create(Album album) => txn(() => db.albums.store(album));
|
Future<Album> create(Album album) => txn(() => db.albums.store(album));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<Album?> getByName(String name, {bool? shared, bool? remote, bool? owner}) {
|
Future<Album?> getByName(
|
||||||
|
String name, {
|
||||||
|
bool? shared,
|
||||||
|
bool? remote,
|
||||||
|
bool? owner,
|
||||||
|
}) {
|
||||||
var query = db.albums.filter().nameEqualTo(name);
|
var query = db.albums.filter().nameEqualTo(name);
|
||||||
if (shared != null) {
|
if (shared != null) {
|
||||||
query = query.sharedEqualTo(shared);
|
query = query.sharedEqualTo(shared);
|
||||||
}
|
}
|
||||||
if (owner == true) {
|
if (owner == true) {
|
||||||
query = query.owner((q) => q.isarIdEqualTo(Store.get(StoreKey.currentUser).isarId));
|
query = query.owner(
|
||||||
|
(q) => q.isarIdEqualTo(Store.get(StoreKey.currentUser).isarId),
|
||||||
|
);
|
||||||
} else if (owner == false) {
|
} else if (owner == false) {
|
||||||
query = query.owner((q) => q.not().isarIdEqualTo(Store.get(StoreKey.currentUser).isarId));
|
query = query.owner(
|
||||||
|
(q) => q.not().isarIdEqualTo(Store.get(StoreKey.currentUser).isarId),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (remote == true) {
|
if (remote == true) {
|
||||||
query = query.localIdIsNull();
|
query = query.localIdIsNull();
|
||||||
|
|
Loading…
Add table
Reference in a new issue