mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-13 17:30:28 +00:00
feat: Add support for hash and private channels with corresponding UI updates
- Introduced new localization strings for channel types and their descriptions in Italian, German, Spanish, French, Croatian, Slovenian, and English. - Updated the `AppProvider` to handle channel info reception, including deletion of channels and updating the UI accordingly. - Enhanced `ChannelsProvider` to support channel removal and notify listeners. - Modified `ConnectionProvider` to include methods for checking empty channel slots and deleting channels. - Updated BLE service methods to handle channel deletion and verification. - Improved the `AddChannelDialog` to differentiate between hash and private channels, including dynamic UI elements based on channel type. - Added delete functionality for channels in the `ContactTile` widget with confirmation dialogs. - Adjusted permission request dialog behavior to allow dismissing by tapping outside.
This commit is contained in:
@@ -1043,7 +1043,19 @@ class BleResponseHandler {
|
||||
final flags = info['flags'] as int?;
|
||||
|
||||
debugPrint(' ✅ [ChannelInfo] Channel $channelIdx: "$channelName"');
|
||||
onChannelInfoReceived?.call(channelIdx, channelName, secret, flags);
|
||||
debugPrint(' Name length: ${channelName.length}');
|
||||
debugPrint(' Name bytes: ${channelName.codeUnits.map((c) => c.toRadixString(16).padLeft(2, '0')).join(' ')}');
|
||||
debugPrint(' Secret: ${secret.map((b) => b.toRadixString(16).padLeft(2, '0')).join('')}');
|
||||
debugPrint(' isEmpty: ${channelName.isEmpty}');
|
||||
debugPrint(' Callback exists: ${onChannelInfoReceived != null}');
|
||||
|
||||
if (onChannelInfoReceived != null) {
|
||||
debugPrint(' 🔔 Calling onChannelInfoReceived callback...');
|
||||
onChannelInfoReceived!(channelIdx, channelName, secret, flags);
|
||||
debugPrint(' ✅ Callback completed');
|
||||
} else {
|
||||
debugPrint(' ⚠️ No callback registered!');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(' ❌ [ChannelInfo] Parsing error: $e');
|
||||
|
||||
Reference in New Issue
Block a user