Files
buzz/mobile/lib/features/channels/camera_capture_cleanup.dart
klopez4212 8398468ec9 Refine the mobile message composer (#2730)
## Summary
- replace the mobile composer sheet with a compact expanding capsule
- add vertically stacked attachment actions and an inline camera preview
- align suggestion, formatting, and send treatments with desktop

## Validation
- `just mobile-check`
- `just mobile-test` (541 passed, 1 skipped)

---------

Signed-off-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
Co-authored-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
2026-07-24 16:32:22 -07:00

22 lines
457 B
Dart

import 'dart:io';
import 'package:image_picker/image_picker.dart';
Future<void> processCapturedImage(
XFile image,
Future<void> Function(XFile image) onCapture,
) async {
try {
await onCapture(image);
} finally {
final path = image.path;
if (path.isNotEmpty) {
try {
await File(path).delete();
} on FileSystemException {
// The camera plugin may already have removed its temporary file.
}
}
}
}