* chore(mobile): move Drift into mobile/data * Move into more structured subdirectories * Fix changed merge paths
15 lines
446 B
Dart
15 lines
446 B
Dart
import 'dart:async';
|
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/data/db/main/database.dart';
|
|
|
|
Drift Function(Ref ref) driftOverride(Drift drift) => (ref) {
|
|
ref.onDispose(() => unawaited(drift.close()));
|
|
ref.keepAlive();
|
|
return drift;
|
|
};
|
|
|
|
final driftProvider = Provider<Drift>(
|
|
(ref) => throw UnimplementedError("driftProvider must be overridden in the isolate's ProviderContainer before use"),
|
|
);
|