SBM67: change the persisting logic

It looks like the 'NOT_CONNECTED' state does not get intercepted, change it to 'CONNECTING' as Gadgetbridge will attempt a reconnection immediately after disconnect
This commit is contained in:
Daniele Gobbetti
2026-03-22 16:13:37 +01:00
parent 1c3c6c8ce9
commit 27cad55c48
@@ -83,7 +83,7 @@ public class GenericBloodPressureSupport extends AbstractBTLESingleDeviceSupport
final GBDevice.DeviceUpdateSubject subject = (GBDevice.DeviceUpdateSubject) intent.getSerializableExtra(GBDevice.EXTRA_UPDATE_SUBJECT);
if (GBDevice.DeviceUpdateSubject.CONNECTION_STATE.equals(subject) &&
GBDevice.State.NOT_CONNECTED.equals(gbDevice.getState()) &&
GBDevice.State.CONNECTING.equals(gbDevice.getState()) &&
!measurements.isEmpty()) {
// This particular device disconnects automatically once the transfer is finished, hence this method of persisting the samples works, but it's far from ideal
persistMeasurements();