fix(mobile): make EXIF provider reactive (#31552)

* fix(mobile): make EXIF provider reactive

* Fix tests

* Remove unnecessary invalidations
This commit is contained in:
Adam Gastineau
2026-09-16 17:36:37 +00:00
committed by GitHub
parent 32b2cdba61
commit bd59a373de
9 changed files with 17 additions and 23 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ class RepositoryMocks {
}
void _stubRemoteAssetRepository() {
when(remoteAsset.getExif).thenAnswer((_) async => null);
when(remoteAsset.watchExif).thenAnswer((_) => Stream.value(null));
when(remoteAsset.getAssetEdits).thenAnswer((_) async => const []);
when(remoteAsset.update).thenAnswer((_) async {});
}
@@ -269,8 +269,8 @@ extension type const LocalAssetRepositoryStub(MockLocalAssetRepository repo) imp
extension type const RemoteAssetRepositoryStub(MockRemoteAssetRepository repo)
implements Stub<MockRemoteAssetRepository> {
Future<ExifInfo?> Function() get getExif =>
() => repo.getExif(any());
Stream<ExifInfo?> Function() get watchExif =>
() => repo.watchExif(any());
Future<List<AssetEdit>> Function() get getAssetEdits =>
() => repo.getAssetEdits(any());
@@ -111,7 +111,7 @@ void main() {
await tester.pump();
verify(() => context.repository.remoteAsset.repo.getAssetEdits(asset.id)).called(1);
verify(() => context.repository.remoteAsset.repo.getExif(asset.id)).called(1);
verify(() => context.repository.remoteAsset.repo.watchExif(asset.id)).called(1);
});
});