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

@ -57,6 +57,9 @@ class _AbawoBtAppState extends ConsumerState<AbawoBtApp>
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.hidden ||
state == AppLifecycleState.paused) {
if (ref.read(backgroundBluetoothDisconnectSuppressedProvider)) {
return;
}
unawaited(_disconnectBluetoothForBackground());
}
}