mirror of
https://github.com/immich-app/immich.git
synced 2026-09-30 21:28:12 +08:00
* chore(mobile): enable dead code CI * Restore accidentally removed test and set mise default
18 lines
603 B
Dart
18 lines
603 B
Dart
import 'dart:async';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/data/db/main/database.dart';
|
|
import 'package:immich_mobile/data/store.dart';
|
|
|
|
@visibleForTesting
|
|
Drift Function(Ref ref) driftOverride(Drift drift) => (ref) {
|
|
ref.onDispose(() => unawaited(drift.close()));
|
|
ref.keepAlive();
|
|
return drift;
|
|
};
|
|
|
|
/// Direct database access for the repositories that have not yet been migrated to `Store`
|
|
// TODO(rewrite): Remove this provider once all repositories have migrated to `Store`
|
|
final driftProvider = Store.db;
|