fix: fix disconnect when selecting firmware for dfu

This commit is contained in:
2026-05-03 19:24:57 +02:00
parent 3310387ec4
commit f5e5c3904f
3 changed files with 23 additions and 2 deletions

View File

@ -14,6 +14,13 @@ part 'bluetooth.g.dart';
final log = Logger('BluetoothController');
final backgroundBluetoothDisconnectSuppressionCountProvider =
StateProvider<int>((ref) => 0);
final backgroundBluetoothDisconnectSuppressedProvider = Provider<bool>((ref) {
return ref.watch(backgroundBluetoothDisconnectSuppressionCountProvider) > 0;
});
@Riverpod(keepAlive: true)
FlutterReactiveBle reactiveBle(Ref ref) {
ref.keepAlive();