diff --git a/lib/screens/ble_debug_log_screen.dart b/lib/screens/ble_debug_log_screen.dart index c229c2e5..2972b22a 100644 --- a/lib/screens/ble_debug_log_screen.dart +++ b/lib/screens/ble_debug_log_screen.dart @@ -110,20 +110,29 @@ class _BleDebugLogScreenState extends State { final entry = entries[index]; final time = '${entry.timestamp.hour.toString().padLeft(2, '0')}:${entry.timestamp.minute.toString().padLeft(2, '0')}:${entry.timestamp.second.toString().padLeft(2, '0')}'; - return GestureDetector( - onLongPress: () async { - await Clipboard.setData( - ClipboardData( - text: entry.payload - .map( - (b) => b - .toRadixString(16) - .padLeft(2, '0'), - ) - .join(''), - ), + Future copyHex() async { + await Clipboard.setData( + ClipboardData( + text: entry.payload + .map( + (b) => b + .toRadixString(16) + .padLeft(2, '0'), + ) + .join(''), + ), + ); + if (context.mounted) { + showDismissibleSnackBar( + context, + content: Text(context.l10n.debugLog_bleCopied), ); - }, + } + } + + return GestureDetector( + onTap: copyHex, + onLongPress: copyHex, child: Container( color: MeshPalette.bg, padding: const EdgeInsets.symmetric(