Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgquest committed Jan 8, 2025
1 parent 979ce90 commit 3a92fa8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions mobile/lib/repositories/album.repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,24 @@ class AlbumRepository extends DatabaseRepository implements IAlbumRepository {
Future<Album> create(Album album) => txn(() => db.albums.store(album));

@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);
if (shared != null) {
query = query.sharedEqualTo(shared);
}
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) {
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) {
query = query.localIdIsNull();
Expand Down

0 comments on commit 3a92fa8

Please sign in to comment.