review changes

This commit is contained in:
shenlong-tanwen
2026-06-29 02:41:18 +05:30
parent 376fc39598
commit bc7d14eeeb
4 changed files with 5 additions and 5 deletions
@@ -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
+1 -1
View File
@@ -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 {