1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-14 09:42:10 -04:00

bluetooth: cleanup service

This commit is contained in:
bbedward
2025-07-17 20:35:40 -04:00
parent a66d6c2b55
commit 66671f757b
4 changed files with 96 additions and 132 deletions

View File

@@ -203,6 +203,9 @@ shell.qml # Main entry point (minimal orchestration)
- Services expose properties and functions
- Widgets bind to service properties for reactive updates
- Use service functions for actions: `ServiceName.performAction(value)`
- **CRITICAL**: DO NOT create wrapper functions for everything - bind directly to underlying APIs when possible
- Example: Use `BluetoothService.adapter.discovering = true` instead of `BluetoothService.startScan()`
- Example: Use `device.connect()` directly instead of `BluetoothService.connect(device.address)`
### Error Handling and Debugging
@@ -320,3 +323,4 @@ When modifying the shell:
- **Robustness**: Implement feature detection and graceful degradation
- **Consistency**: Follow Material Design 3 principles via Theme singleton
- **Performance**: Minimize expensive operations and use appropriate data structures
- **NO WRAPPER HELL**: Avoid creating unnecessary wrapper functions - bind directly to underlying APIs for better reactivity and performance