Skip to content

Commit

Permalink
chore(mobile): fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlong-tanwen committed Feb 19, 2025
1 parent 2377743 commit a6805e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions mobile/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ custom_lint:
# required / wanted
- lib/entities/*.entity.dart
- lib/repositories/{album,asset,backup,database,etag,exif_info,user}.repository.dart
- lib/infrastructure/entities/*.entity.dart
- lib/infrastructure/repositories/{store,db}.repository.dart
- lib/providers/infrastructure/db.provider.dart
# acceptable exceptions for the time being (until Isar is fully replaced)
- integration_test/test_utils/general_helper.dart
- lib/main.dart
Expand Down
3 changes: 1 addition & 2 deletions mobile/lib/providers/infrastructure/db.provider.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:isar/isar.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'db.provider.g.dart';

@Riverpod(keepAlive: true)
Isar isar(Ref ref) => throw UnimplementedError('isar');
Isar isar(IsarRef ref) => throw UnimplementedError('isar');
3 changes: 1 addition & 2 deletions mobile/lib/providers/infrastructure/store.provider.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/domain/interfaces/store.interface.dart';
import 'package:immich_mobile/infrastructure/repositories/store.repository.dart';
import 'package:immich_mobile/providers/infrastructure/db.provider.dart';
Expand All @@ -7,5 +6,5 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'store.provider.g.dart';

@riverpod
IStoreRepository storeRepository(Ref ref) =>
IStoreRepository storeRepository(StoreRepositoryRef ref) =>
IsarStoreRepository(ref.watch(isarProvider));
2 changes: 1 addition & 1 deletion mobile/lib/repositories/user.repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class UserRepository extends DatabaseRepository implements IUserRepository {
Future<User?> getByDbId(int id) async {
return await db.users.get(id);
}

@override
Future<void> clearTable() async {
await txn(() async {
Expand Down

0 comments on commit a6805e1

Please sign in to comment.