mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: impl suggestions
This commit is contained in:
@@ -90,7 +90,7 @@ class AssetViewerStateNotifier extends Notifier<AssetViewerState> {
|
||||
|
||||
void setAsset(BaseAsset asset) {
|
||||
if (asset == state.currentAsset) return;
|
||||
state = state.copyWith(currentAsset: asset, stackIndex: 0);
|
||||
state = state.copyWith(currentAsset: asset, stackIndex: 0, showingOcr: false);
|
||||
}
|
||||
|
||||
void setOpacity(double opacity) {
|
||||
|
||||
@@ -8,7 +8,7 @@ final ocrRepositoryProvider = Provider<OcrRepository>((ref) => OcrRepository(ref
|
||||
|
||||
final ocrServiceProvider = Provider<OcrService>((ref) => OcrService(ref.watch(ocrRepositoryProvider)));
|
||||
|
||||
final ocrAssetProvider = FutureProvider.family<List<Ocr>?, String>((ref, assetId) async {
|
||||
final ocrAssetProvider = FutureProvider.autoDispose.family<List<Ocr>?, String>((ref, assetId) async {
|
||||
final service = ref.watch(ocrServiceProvider);
|
||||
return service.get(assetId);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user