mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-20 23:41:45 +02:00
If a user mapping already exists, skip the user list and jump directly to selecting the scale user.
This commit is contained in:
@@ -174,11 +174,21 @@ public abstract class BluetoothStandardWeightProfile extends BluetoothCommunicat
|
|||||||
break;
|
break;
|
||||||
case REQUEST_VENDOR_SPECIFIC_USER_LIST:
|
case REQUEST_VENDOR_SPECIFIC_USER_LIST:
|
||||||
scaleUserList.clear();
|
scaleUserList.clear();
|
||||||
int uid = (pendingUserId != -1) ? pendingUserId : (this.selectedUser != null ? this.selectedUser.getId() : -1);
|
int uid = (pendingUserId != -1) ? pendingUserId
|
||||||
|
: (this.selectedUser != null ? this.selectedUser.getId() : -1);
|
||||||
int idx = getUserScaleIndex(uid);
|
int idx = getUserScaleIndex(uid);
|
||||||
int cns = getUserScaleConsent(uid);
|
int cns = getUserScaleConsent(uid);
|
||||||
|
|
||||||
LogManager.d(TAG, "REQUEST_VENDOR_SPECIFIC_USER_LIST for appUserId=" + uid
|
LogManager.d(TAG, "REQUEST_VENDOR_SPECIFIC_USER_LIST for appUserId=" + uid
|
||||||
+ " -> index=" + idx + ", consent=" + cns);
|
+ " -> index=" + idx + ", consent=" + cns);
|
||||||
|
|
||||||
|
if (uid != -1 && idx != -1 && cns != -1) {
|
||||||
|
LogManager.d(TAG, "Mapping present -> skipping user list; jumping to SELECT_SCALE_USER");
|
||||||
|
jumpNextToStepNr(SM_STEPS.SELECT_SCALE_USER.ordinal());
|
||||||
|
resumeMachineState();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
requestVendorSpecificUserList();
|
requestVendorSpecificUserList();
|
||||||
stopMachineState();
|
stopMachineState();
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user