mirror of
https://github.com/immich-app/immich.git
synced 2026-07-02 19:10:19 -07:00
review changes
This commit is contained in:
@@ -87,7 +87,7 @@ class AssetService {
|
||||
await _remoteRepository.stack(userId, stack);
|
||||
}
|
||||
|
||||
Future<void> unStack(List<String> stackIds) async {
|
||||
Future<void> unstack(List<String> stackIds) async {
|
||||
if (stackIds.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class StackAction extends AssetAction<RemoteAsset> {
|
||||
if (shouldStack) {
|
||||
await service.stack(scope.authUser.id, assets.map((asset) => asset.id).toList(growable: false));
|
||||
} else {
|
||||
await service.unStack(assets.map((asset) => asset.stackId).nonNulls.toList(growable: false));
|
||||
await service.unstack(assets.map((asset) => asset.stackId).nonNulls.toList(growable: false));
|
||||
}
|
||||
|
||||
final message = shouldStack
|
||||
|
||||
@@ -174,7 +174,7 @@ extension type const AssetServiceStub(MockAssetService service) implements Stub<
|
||||
() => service.stack(any(), any());
|
||||
|
||||
Future<void> Function() get unStack =>
|
||||
() => service.unStack(any());
|
||||
() => service.unstack(any());
|
||||
}
|
||||
|
||||
extension type const NativeSyncApiStub(MockNativeSyncApi api) implements Stub<MockNativeSyncApi> {
|
||||
|
||||
@@ -38,7 +38,7 @@ void main() {
|
||||
|
||||
await tester.pumpTestAction(context, StackAction(assets: [asset]));
|
||||
|
||||
verify(() => assetService.unStack(['stack'])).called(1);
|
||||
verify(() => assetService.unstack(['stack'])).called(1);
|
||||
});
|
||||
|
||||
testWidgets('prioritizes stack when mixed state', (tester) async {
|
||||
@@ -66,7 +66,7 @@ void main() {
|
||||
|
||||
await tester.pumpTestAction(context, StackAction(assets: [first, second]));
|
||||
|
||||
verify(() => assetService.unStack(['stack-1', 'stack-2'])).called(1);
|
||||
verify(() => assetService.unstack(['stack-1', 'stack-2'])).called(1);
|
||||
});
|
||||
|
||||
testWidgets('shows a confirmation snackbar on success', (tester) async {
|
||||
|
||||
Reference in New Issue
Block a user